ROCm / MIVisionX

MIVisionX toolkit is a set of comprehensive computer vision and machine intelligence libraries, utilities, and applications bundled into a single toolkit. AMD MIVisionX also delivers a highly optimized open-source implementation of the Khronos OpenVX™ and OpenVX™ Extensions.
https://rocm.docs.amd.com/projects/MIVisionX/en/latest/
MIT License
186 stars 74 forks source link

OpenVX Core - vxChannelCombineNode corrupting images #338

Closed wsphillips closed 3 years ago

wsphillips commented 4 years ago

There appears to be an issue with graphs that use the channel combine node. Resulting RGB images have periodic artifacts. airplane_test

I ran into this issue when using the filter code example from the official OpenVX Programming Guide. (i.e. it can be used as a reproducer)

Removing the convolution/filter nodes from the above example and creating a graph that only does a RGB channel extract to 3 virtual U8 images and recombining to an RGB output image is enough to trigger the bug.

The canny example from this repo does not cause a problem either (therefore unlikely that split channel data is corrupted during extraction).

Manually recreating the graph pipeline with immediate mode functions (e.g. vxuChannelCombine) does NOT result in corrupted images--resulting RGB composites are fine.

This was run on CentOS 8.1 / ROCm 3.5.1 using mivisionx AMD repo binaries (and also building from master to be sure). (GPU is gfx906 -- Radeon VII)

kiritigowda commented 4 years ago

Test

GDF - channelCombineRGB.txt

run sample

Test Package - channelCombineRGB.zip

kiritigowda commented 4 years ago

@LakshmiKumar23 - attached is the OpenCL code & out.rgb (480x360) generated for the above graph for reference - cl-buffer.zip

LakshmiKumar23 commented 4 years ago

@kiritigowda I don't see this issue on windows. Also, in attached OpenCL code, lines 14&15 redefine uint8.

kiritigowda commented 3 years ago

Test

GDF - channelCombineRGB.txt

run sample

  • Test CPU Flow
runvx -affinity:cpu channelCombineRGB.txt
  • Test GPU Flow
runvx -affinity:gpu channelCombineRGB.txt

Test Package - channelCombineRGB.zip

@hansely can you try this test case and verify the issue is fixed?

hansely commented 3 years ago

@kiritigowda The channel combine is fixed. However, the problem still remains due to channel extract issue. I am working on the fix for it.

hansely commented 3 years ago

@kiritigowda Verified with the test package above and works fine.