diff --git a/samples/2_Cookbook/21_cmake_hip_cxx_clang/README.md b/samples/2_Cookbook/21_cmake_hip_cxx_clang/README.md index 3d9765308c..a7d362a990 100644 --- a/samples/2_Cookbook/21_cmake_hip_cxx_clang/README.md +++ b/samples/2_Cookbook/21_cmake_hip_cxx_clang/README.md @@ -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! +``` diff --git a/samples/2_Cookbook/22_cmake_hip_lang/README.md b/samples/2_Cookbook/22_cmake_hip_lang/README.md index 7f7ac025b1..5ba33f8362 100644 --- a/samples/2_Cookbook/22_cmake_hip_lang/README.md +++ b/samples/2_Cookbook/22_cmake_hip_lang/README.md @@ -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! +``` diff --git a/samples/2_Cookbook/23_cmake_hiprtc/README.md b/samples/2_Cookbook/23_cmake_hiprtc/README.md index 2831619d19..cb270e6466 100644 --- a/samples/2_Cookbook/23_cmake_hiprtc/README.md +++ b/samples/2_Cookbook/23_cmake_hiprtc/README.md @@ -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 +```