From a357a079829e9d2254e6aa104e4ef1732f219f18 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Thu, 20 Oct 2016 10:06:17 -0500 Subject: [PATCH] Update docs and improve hipcc error message. Change-Id: I25636d06959d02cc46c8c476d3948e91ff83ea47 [ROCm/hip commit: bff88d0f636c646a46c0339af77b84459506b9b4] --- projects/hip/CONTRIBUTING.md | 5 +++++ projects/hip/bin/hipcc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/hip/CONTRIBUTING.md b/projects/hip/CONTRIBUTING.md index d535ccac39..f6ed47acef 100644 --- a/projects/hip/CONTRIBUTING.md +++ b/projects/hip/CONTRIBUTING.md @@ -124,6 +124,11 @@ Differences or limitations of HIP APIs as compared to CUDA APIs should be clearl - ihipLogStatus should only be called from top-level HIP APIs,and should be called to log and return the error code. The error code is used by the GetLastError and PeekLastError functions - if a HIP API simply returns, then the error will not be logged correctly. +- All HIP environment variables should begin with the keyword HIP_ + Environment variables should be long enough to describe their purpose but short enough so they can be remembered - perhaps 10-20 characters, with 3-4 parts separated by underscores. + To see the list of current environment variables, along with their values, set HIP_PRINT_ENV and run any hip applications on ROCM platform . + HIPCC or other tools may support additional environment variables which should follow the above convention. + #### Presubmit Testing: diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index 2f3cd46c62..d5e40b8961 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -353,7 +353,7 @@ if ($printHipVersion) { } if ($runCmd) { if ($HIP_PLATFORM eq "hcc" and exists($hipConfig{'HCC_VERSION'}) and $HCC_VERSION ne $hipConfig{'HCC_VERSION'}) { - print ("HIP ($HIP_PATH) was built using hcc $hipConfig{'HCC_VERSION'}, but you are using hcc $HCC_VERSION. Please rebuild HIP including cmake.\n") && die (); + print ("HIP ($HIP_PATH) was built using hcc $hipConfig{'HCC_VERSION'}, but you are using $HCC_HOME/hcc with version $HCC_VERSION from hipcc. Please rebuild HIP including cmake or update HCC_HOME variable.\n") && die (); } system ("$CMD") and die (); }