SWDEV-393746 - Fix HIP sample failures-21, 22, 23 (#331)

Change-Id: Id839cf24ba5f16897428b19c0299ea781a5a6d09
This commit is contained in:
ROCm CI Service Account
2023-06-28 21:59:03 +05:30
committed by GitHub
parent 529d245738
commit 90de01adb9
3 changed files with 24 additions and 6 deletions
@@ -1,15 +1,18 @@
### This sample tests CXX Language support with amdclang++
I. Build
```
mkdir -p build; cd build
rm -rf *;
CXX=`hipconfig -l`/amdclang++ cmake .. (or)
cmake -DCMAKE_CXX_COMPILER=/opt/rocm/bin/amdclang++ .. (or)
cmake -DCMAKE_CXX_COMPILER=/opt/rocm-X.Y.Z/llvm/bin/amdclang++ ..
CXX="$(hipconfig -l)"/amdclang++ cmake -DCMAKE_PREFIX_PATH=/opt/rocm ..
make
```
II. Test
```
$ ./square
info: running on device Vega 20 [Radeon Pro Vega 20]
info: running on device AMD Radeon Graphics
info: allocate host mem ( 7.63 MB)
info: allocate device mem ( 7.63 MB)
info: copy Host2Device
@@ -17,3 +20,4 @@ info: launch 'vector_square' kernel
info: copy Device2Host
info: check result
PASSED!
```
@@ -1,10 +1,16 @@
### This will test HIP language support in upstream CMake
I. Build
```
mkdir -p build; cd build
rm -rf *; cmake -DCMAKE_PREFIX_PATH=/opt/rocm/ ..
rm -rf *;
cmake -DCMAKE_PREFIX_PATH=/opt/rocm ..
make
```
II. Test
```
$ ./square
info: running on device
info: allocate host mem ( 7.63 MB)
@@ -14,3 +20,4 @@ info: launch 'vector_square' kernel
info: copy Device2Host
info: check result
PASSED!
```
+8 -1
View File
@@ -1,9 +1,16 @@
### This will test linking hiprtc::hiprtc interface in cmake
I. Build
```
mkdir -p build; cd build
rm -rf *; CXX=amdclang++ cmake -DCMAKE_PREFIX_PATH=/opt/rocm/hip ..
rm -rf *;
CXX="$(hipconfig -l)"/amdclang++ cmake -DCMAKE_PREFIX_PATH=/opt/rocm ..
make
```
II. Test
```
$ ./test
SAXPY test completed
```