nvdla / sw

NVDLA SW
Other
487 stars 193 forks source link

How can I concatenate Width-Wise in NVDLA since RUBIK doesn't support that? #144

Open ghost opened 5 years ago

ghost commented 5 years ago

I am trying to implement YoloV3 in NVDLA. There is a concatenation operation in YOLOv3. I cannot find any module in nvdla that supports this. Rubik supports only channel-wise splitting and merging. I need to concatenate data cubes width-wise.

prasshantg commented 5 years ago

No HW operation required for this. This can be achieved using single tensor and setting correct strides. NVDLA compiler handles it.

xiao777dong commented 5 years ago

No HW operation required for this. This can be achieved using single tensor and setting correct strides. NVDLA compiler handles it.

Hi, prasshantg. How should I do to concate two parts? How to set correct strides? Hoping for help. Thank you.

xiao777dong commented 5 years ago

I am trying to implement YoloV3 in NVDLA. There is a concatenation operation in YOLOv3. I cannot find any module in nvdla that supports this. Rubik supports only channel-wise splitting and merging. I need to concatenate data cubes width-wise.

I have met the same problem. Have you solved the problem? Thank you.

ghost commented 5 years ago

I think I have found a solution. You can see this on paper for better visualisation, in concatenation simply the new block is added behind the given block. If you see how this given block is mapped in memory you will see the solution. Try to visualize how the final concatenated block will be mapped in memory, then you will see that concatenation simple means mapping the two memory blocks back to back in the memory and then when you perform any operation on that block, it will be like you are performing the operation on the final concatenated product(Block). So basically I'm viewing this concatenation problem like a memory mapping problem. I'm afraid addition hardware might be required since we won't be able to manipulate the instruction set of memory just for our "special case".

concat

xiao777dong commented 5 years ago

Thank you very much.