SWDEV-436821 Update hip samples Readme files

Change-Id: I6bf3a72eac4a4242cb2dbf4e6eee73e0e1bef2ef
This commit is contained in:
Rahul Manocha
2023-12-11 03:43:30 +00:00
orang tua f5deb13ce3
melakukan 76dd8ea569
29 mengubah file dengan 471 tambahan dan 237 penghapusan
+23
Melihat File
@@ -4,3 +4,26 @@ Show an application written directly in HIP which uses platform-specific check o
an instruction that only exists on the AMD platform.
See related [blog](http://gpuopen.com/platform-aware-coding-inside-hip/) demonstrating platform specialization.
- Steps to build this sample:
```
$ mkdir build; cd build
$ cmake .. -DCMAKE_PREFIX_PATH=/opt/rocm
$ make
```
- Execute File
```
$ ./bit_extract
pch size: 11743288
__hipGetPCH succeeded!
info: running on device #0
info: allocate host mem ( 7.63 MB)
info: allocate device mem ( 7.63 MB)
info: copy Host2Device
info: launch 'bit_extract_kernel'
info: copy Device2Host
info: check result
PASSED!
```
+19
Melihat File
@@ -0,0 +1,19 @@
# module_api
- Steps to build this sample
```
$ mkdir build; cd build
$ cmake .. -DCMAKE_PREFIX_PATH=/opt/rocm
$ make
```
- Execute Code
```
$ ./launchKernelHcc.hip.out
PASSED!
$ ./runKernel.hip.out
PASSED!
$ ./defaultDriver.hip.out
PASSED!
```
@@ -0,0 +1,17 @@
# module_api_global
- Steps to build this sample
```
$ mkdir build; cd build
$ cmake .. -DCMAKE_PREFIX_PATH=/opt/rocm
$ make
```
- Execute Code
```
$ ./runKernel1.hip.out
PASSED!
Shared Size Bytes = 0
Num Regs = 3
PASSED!
```
-3
Melihat File
@@ -3,19 +3,16 @@
Simple test below is an example, shows how to use hipify-perl to port CUDA code to HIP:
- Add hip/bin path to the PATH
```
$ export PATH=$PATH:[MYHIP]/bin
```
- Define environment variable
```
$ export HIP_PATH=[MYHIP]
```
- Build executable file
```
$ cd ~/hip/samples/0_Intro/square
mkdir -p build && cd build