SWDEV-287830 - Remove hardcoding of /opt/rocm path (#2390)

Change-Id: If96739816b56e4cec58f457a91f18411075b2eb4
This commit is contained in:
ansurya
2021-11-25 15:10:03 +05:30
committed by GitHub
parent a6f49b27db
commit acf75c28c1
3 changed files with 22 additions and 20 deletions
+7 -6
View File
@@ -1,7 +1,8 @@
# Contributor Guidelines
## Make Tips
When building HIP, you will likely want to build and install to a local user-accessible directory (rather than /opt/rocm).
ROCM_PATH is path where ROCM is installed. BY default ROCM_PATH is /opt/rocm.
When building HIP, you will likely want to build and install to a local user-accessible directory (rather than <ROCM_PATH>).
This can be easily be done by setting the -DCMAKE_INSTALL_PREFIX variable when running cmake. Typical use case is to
set CMAKE_INSTALL_PREFIX to your HIP git root, and then ensure HIP_PATH points to this directory. For example
@@ -31,7 +32,7 @@ In some cases new HIP-Clang features are tied to specified releases, and it can
HIP runtime version
```
> cat /opt/rocm/hip/bin/.hipVersion
> cat <ROCM_PATH>/hip/bin/.hipVersion
# Auto-generated by cmake
HIP_VERSION_MAJOR=3
HIP_VERSION_MINOR=9
@@ -41,11 +42,11 @@ HIP_VERSION_PATCH=20345-519ef3f2
HIP-Clang compiler version
```
$ /opt/rocm/llvm/bin/clang -v
$ <ROCM_PATH>/llvm/bin/clang -v
clang version 11.0.0 (/src/external/llvm-project/clang 075fedd3fd2f4d9d8cca79d0cd51f64c5ef21432)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm/llvm/bin
InstalledDir: <ROCM_PATH>/llvm/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
@@ -73,8 +74,8 @@ For applications and benchmarks outside the directed test environment, developme
## Environment Variables
- **HIP_PATH** : Location of HIP include, src, bin, lib directories.
- **HCC_ROCCLR_HOME** : Path to HIP/ROCclr directory, used on AMD platforms. Default /opt/rocm/rocclr.
- **HSA_PATH** : Path to HSA include, lib. Default /opt/rocm/hsa.
- **HCC_ROCCLR_HOME** : Path to HIP/ROCclr directory, used on AMD platforms. Default <ROCM_PATH>/rocclr.
- **HSA_PATH** : Path to HSA include, lib. Default <ROCM_PATH>/hsa.
- **CUDA_PATH* : On nvcc system, this points to root of CUDA installation.
## Contribution guidelines ##