ファイル
rocm-systems/samples/0_Intro/square/README.md
T

17 行
592 B
Markdown
Raw 通常表示 履歴

2016-01-26 10:43:41 -05:00
# Square.md
2016-01-26 20:14:33 -06:00
Simple test which shows how to use hipify to port CUDA code to HIP.
See related [blog](http://gpuopen.com/hip-to-be-squared-an-introductory-hip-tutorial) that explains the example.
2016-01-26 20:14:33 -06:00
1. Add hip/bin path to the PATH :
2016-01-26 10:43:41 -05:00
<code>export PATH=$PATH:[MYHIP]/bin</code>
2016-01-26 20:14:33 -06:00
2016-01-26 10:43:41 -05:00
2. Do <code>$ hipify square.cu > square.cpp </code>
2016-01-26 20:14:33 -06:00
3. Manually edit square.cpp to add hipLaunchParms lp to kernel parms:
2016-01-26 10:43:41 -05:00
<code>vector_square(hipLaunchParm lp, T *C_d, const T *A_d, size_t N)</code>
2016-01-26 20:14:33 -06:00
(see square.hipref.cpp for the correct output after running hipify and the above manual step)
4. make