Some cosmetic changes
Этот коммит содержится в:
Maneesh Gupta
2016-04-18 12:34:36 +05:30
родитель bcaefb81fc
Коммит 4bdbc7c5b6
+14 -15
Просмотреть файл
@@ -11,7 +11,7 @@ Key features include:
New projects can be developed directly in the portable HIP C++ language and can run on either NVIDIA or AMD platforms. Additionally, HIP provides porting tools which make it easy to port existing CUDA codes to the HIP layer, with no loss of performance as compared to the original CUDA application. HIP is not intended to be a drop-in replacement for CUDA, and developers should expect to do some manual coding and performance tuning work to complete the port.
## Installation
```
```shell
cd HIP-privatestaging
mkdir build
cd build
@@ -50,12 +50,10 @@ HIP code can be developed either on AMD ROCm platform using hcc compiler, or a C
* Install CUDA SDK from manufacturer website
* By default HIP looks for CUDA SDK in /usr/local/cuda (can be overriden by setting CUDA_PATH env variable)
```
#### Verify your installation
Run hipconfig (instructions below assume default installation path) :
```
> /opt/rocm/bin/hipconfig --full
```shell
/opt/rocm/bin/hipconfig --full
```
Compile and run the [square sample](https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/tree/master/samples/0_Intro/square).
@@ -74,31 +72,31 @@ Also this [blog](http://gpuopen.com/getting-up-to-speed-with-the-codexl-gpu-prof
and visualization tools, CodeXL also comes with an SDK that allow applications to add markers to the timeline viewer. We'll be linking HIP against this library.
2. Set CODEXL_PATH
```
```shell
# set to your code-xl installation location:
export CODEXL_PATH=/opt/AMD/CodeXL
```
3. Enable in source code.
In src/hip_hcc.cpp, enable the define
```
```c
#define COMPILE_TRACE_MARKER 1
```
Then recompile the target application, run with profiler enabled to generate ATP file or trace log.
```
```shell
# Use profiler to generate timeline view:
$ $CODEXL_PATH/CodeXLGpuProfiler -A -o ./myHipApp
$CODEXL_PATH/CodeXLGpuProfiler -A -o ./myHipApp
...
Session output path: /home/me/HIP-privatestaging/tests/b1/mytrace.atp
```
You can also print the HIP function strings to stderr using HIP_TRACE_API environment variable. This can be useful for tracing application flow. Also can be combined with the more detailed debug information provided
by the HIP_DB switch. For example:
```
```shell
# Trace to stderr showing begin/end of each function (with arguments) + intermediate debug trace during the execution of each function.
$ HIP_TRACE_API=1 HIP_DB=0x2 ./myHipApp
HIP_TRACE_API=1 HIP_DB=0x2 ./myHipApp
```
Note this trace mode uses colors. "less -r" can handle raw control characters and will display the debug output in proper colors.
@@ -115,7 +113,8 @@ Here's how to use it with HIP:
> (In the make step for HCC, we recommend setting -DCMAKE_INSTALL_PREFIX=/opt/hcc-native)
Set HCC_HOME environment variable before compiling HIP program to point to the native compiler:
> export HCC_HOME=/opt/hcc-native
```shell
export HCC_HOME=/opt/hcc-native
```
## Examples and Getting Started:
@@ -124,14 +123,14 @@ Set HCC_HOME environment variable before compiling HIP program to point to the n
```shell
> cd samples/01_Intro/square
cd samples/01_Intro/square
# follow README / blog steps to hipify the application.
```
* A sample and [blog](http://gpuopen.com/platform-aware-coding-inside-hip/) demonstrating platform specialization:
```shell
> cd samples/01_Intro/bit_extract
> make
cd samples/01_Intro/bit_extract
make
```
* Guide to [Porting a New Cuda Project](docs/markdown/hip_porting_guide.md#porting-a-new-cuda-project" aria-hidden="true"><span aria-hidden="true)