AMDMIGraphX icon indicating copy to clipboard operation
AMDMIGraphX copied to clipboard

Concat + Convert Fusion

Open umangyadav opened this issue 1 year ago • 3 comments

440 = gpu::code_object[code_object=9544,symbol_name=concat_kernel,global=714000,local=1024,](@439,@436,@437,@438) -> half_type, {1, 25200, 85}, {2142000, 85, 1}, target_id=0: 0.0305542ms, 2%
main:#output_0 = @param:main:#output_0 -> float_type, {1, 25200, 85}, {2142000, 85, 1}, target_id=0: 0.0007664ms, 1%
@442 = gpu::code_object[code_object=9032,symbol_name=convert_kernel,global=1071000,local=1024,](@440,main:#output_0) -> float_type, {1, 25200, 85}, {2142000, 85, 1}, target_id=0: 0.0203739ms, 1%

This code snippet is from YOLOv5s model. Notice that "convert + concat" operations can be fused together.

This is for some reason is not handled right now. Need to investigate why.

umangyadav avatar Feb 29 '24 21:02 umangyadav

this is not being handled right now because,

pointwise_concat_pointwise fusion requires atleast one of the inputs to the concat to be pointwise op.

For the case of YOLOv5s , all the inputs to this concat are "reshape_lazy" operations. That's why it is not being handled.

@pfultz2 can we remove the condition of atleast one input to be pointwise ?

umangyadav avatar Feb 29 '24 21:02 umangyadav

Umang to see if this is already done

causten avatar Jul 25 '24 16:07 causten

This is not resolved yet. Reason is the in comment that i did earlier about pointwise_concat_pointwise

umangyadav avatar Jul 26 '24 13:07 umangyadav