Skip to content

kkHuang-amd/HIP-Optimization-Bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HIP-Optimization-Bug


The code comes from the Lotus project, which can be found at https://github.com/filecoin-project/lotus

LICENSE-MIT and LICENSE-APACHE are two of the lotus licenses.


Test1(gfx908)

  • gpu : gfx908
  • os: ubuntu 20.04
  • hip_version: 5.0.0(different versions tested, but always results in the same error)

-O0 flag

$ ./run.sh 
rm -f g1_add *.o
/opt/rocm/hip/bin/hipcc -std=c++14 -O0 -I/opt/include/ -o g1_add g1_add.cu
x: 695163763, 838428337, 867136025, 3916970060, 1083605276, 2882035772, 3603006931, 2269309842, 422274527, 1169772790, 1990394245, 416975321, 
y: 1229022948, 3366429108, 670218974, 1658335027, 392632874, 1379067484, 798160530, 3656524164, 3793686573, 2144155088, 2721370348, 298035558, 
z: 413203031, 3318893592, 1282426328, 1145762026, 1542369093, 485346739, 1679000480, 4026228341, 2371190916, 3558967189, 3094593878, 414846589,

-O3 flag

$ ./run.sh 
rm -f g1_add *.o
/opt/rocm/hip/bin/hipcc -std=c++14 -O3 -I/opt/include/ -o g1_add g1_add.cu
x: 695163763, 838428337, 867136025, 3916970060, 1083605276, 2882035772, 3603006931, 2269309842, 422274527, 1169772790, 1990394245, 416975321, 
y: 1229022948, 3366429108, 670218974, 1658335027, 392632874, 1379067484, 798160530, 3656524164, 3793686573, 2144155088, 2721370348, 298035558, 
z: 413203031, 3318893592, 1282426328, 1145762026, 1542369093, 485346739, 1679000480, 4026228341, 2371190916, 3558967189, 3094593878, 414846589,

Test2(gfx900)

  • gpu : gfx900
  • os: ubuntu 20.04
  • hip_version: 5.0.0

-O0 flag

$ ./run.sh 
rm -f g1_add *.o
/opt/rocm/hip/bin/hipcc -std=c++14 -O0 -I/opt/include/ --amdgpu-target=gfx900 -o g1_add g1_add.cu
x: 695163763, 838428337, 867136025, 3916970060, 1083605276, 2882035772, 3603006931, 2269309842, 422274527, 1169772790, 1990394245, 416975321, 
y: 1229022948, 3366429108, 670218974, 1658335027, 392632874, 1379067484, 798160530, 3656524164, 3793686573, 2144155088, 2721370348, 298035558, 
z: 413203031, 3318893592, 1282426328, 1145762026, 1542369093, 485346739, 1679000480, 4026228341, 2371190916, 3558967189, 3094593878, 414846589,

-O3 flag

./run.sh 
rm -f g1_add *.o
/opt/rocm/hip/bin/hipcc -std=c++14 -O3 -I/opt/include/ -o g1_add g1_add.cu
x: 695163763, 838428337, 867136025, 3916970060, 1083605276, 2882035772, 3603006931, 2269309842, 422274527, 1169772790, 1990394245, 416975321, 
y: 1229022948, 3366429108, 670218974, 1658335027, 392632874, 1379067484, 798160530, 3656524164, 3793686573, 2144155088, 2721370348, 298035558, 
z: 413203031, 3318893592, 1282426328, 1145762026, 1542369093, 485346739, 1679000480, 4026228341, 2371190916, 3558967189, 3094593878, 414846589,

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages