Files
rocm-systems/samples/2_Cookbook/22_cmake_hip_lang
Rahul Manocha c6d3505d63 SWDEV-431345 Cmake for hip sample 22
Change-Id: I9b1149b2e83b2f639882011d75b4fb9e2419ff8d
2024-01-18 12:10:03 -05:00
..

This will test HIP language support in upstream CMake

I. Build

$ mkdir -p build; cd build
$ rm -rf *;
$ cmake -DCMAKE_PREFIX_PATH=/opt/rocm ..
$ make

II. Test

$ ./square
info: running on device
info: allocate host mem (  7.63 MB)
info: allocate device mem (  7.63 MB)
info: copy Host2Device
info: launch 'vector_square' kernel
info: copy Device2Host
info: check result
PASSED!