HIP icon indicating copy to clipboard operation
HIP copied to clipboard

Program compiled with `hipcc -O0` from ROCm 5.3.2 do not run correctly

Open fxzjshm opened this issue 3 years ago • 7 comments

Using vectoradd_hip.cpp from HIP examples, the executable produced by hipcc from ROCm 5.3.2 with -O0 flag cannot run correctly.

Log:

➜  test /opt/rocm-5.2.3/bin/hipcc -O0 vectoradd_hip.cpp -o vectoradd_hip_O0_5.2.3
➜  test /opt/rocm-5.2.3/bin/hipcc -O1 vectoradd_hip.cpp -o vectoradd_hip_O1_5.2.3
➜  test /opt/rocm-5.3.2/bin/hipcc -O0 vectoradd_hip.cpp -o vectoradd_hip_O0_5.3.2
➜  test /opt/rocm-5.3.2/bin/hipcc -O1 vectoradd_hip.cpp -o vectoradd_hip_O1_5.3.2
➜  test ./vectoradd_hip_O0_5.2.3
 System minor 0
 System major 9
 agent prop name AMD Radeon VII
hip Device prop succeeded 
PASSED!                                                                    /0.4s
➜  test ./vectoradd_hip_O1_5.2.3
 System minor 0
 System major 9
 agent prop name AMD Radeon VII
hip Device prop succeeded 
PASSED!                                                                    /0.4s
➜  test ./vectoradd_hip_O0_5.3.2
 System minor 0
 System major 9
 agent prop name AMD Radeon VII
hip Device prop succeeded 
FAILED: 1048576 errors                                                     /0.5s
➜  test ./vectoradd_hip_O1_5.3.2
 System minor 0
 System major 9
 agent prop name AMD Radeon VII
hip Device prop succeeded 
PASSED!                                                                    /0.5s

Seems a clang-15 + ROCm 5.3.2 problem.

Related discussion: illuhad/hipSYCL#869

fxzjshm avatar Nov 17 '22 17:11 fxzjshm

I could reproduce the error with ROCm 5.4 on a MI-series GPU.

zjin-lcf avatar Dec 06 '22 23:12 zjin-lcf

@fxzjshm Hi, is your issue resolved on the latest HIP? If so can we close this ticket?

abhimeda avatar Feb 08 '24 15:02 abhimeda

Not reproduced with ROCm 5.7.0 + gfx1100 & ROCm 6.0.0 + gfx1035, will test gfx906 once have access again.

fxzjshm avatar Feb 08 '24 16:02 fxzjshm

Still reproduced with ROCm 6.0.0 & 6.0.2 + gfx906.

fxzjshm avatar Feb 22 '24 12:02 fxzjshm

@fxzjshm Internal ticket has been created to resolve this issue. Thanks!

ppanchad-amd avatar Apr 10 '24 18:04 ppanchad-amd

@fxzjshm, which GPU are you currently to repro the issue? MI50, Radeon PRO VII, or Radeon VII? Thanks.

nartmada avatar May 01 '24 03:05 nartmada

@nartmada It's Radeon VII, as shown above in the log. Is this bug reproducible on your test environment?

fxzjshm avatar May 01 '24 15:05 fxzjshm

Hi @fxzjshm, I was unable to reproduce your issue compiling the vectoradd_hip.cpp program with the -O0 flag on gfx906. Please see the output below.

rocm@rocm:~/vecadd$ hipcc -O0 vectoradd_hip.cpp -o vectoradd
#Warnings
rocm@rocm:~/vecadd$ ./vectoradd
 System minor 0
 System major 9
 agent prop name AMD Radeon VII
hip Device prop succeeded
PASSED!

This was tested on the latest ROCm 6.1.2 release. I will close this ticket for now, if you encounter this issue again, feel free to re-open this issue. Thanks!

harkgill-amd avatar Jul 19 '24 18:07 harkgill-amd