Updated hipEnvVarDriver to work with Windows (#1614)

* Updated hipEnvVarDriver to work with Windows

* Cleaned up a bit of code

* Fixed a part where putenv was used for both win and linux

* Defines moved to test_common.h and cleaned up code

* Cleaned up some macro defines and used const char instead

* Got rid of some excess commenting

* directory paths are unconditional

* Cleaned some duplicate code, and variables are now declared and defined together


[ROCm/hip commit: e73927caee]
This commit is contained in:
jiabaxie
2019-11-18 01:48:29 -05:00
committed by Maneesh Gupta
parent fac2e14dab
commit cd3bf4e205
3 changed files with 39 additions and 26 deletions
+9 -1
View File
@@ -33,7 +33,15 @@ unsigned threadsPerBlock = 256;
int p_gpuDevice = 0;
unsigned p_verbose = 0;
int p_tests = -1; /*which tests to run. Interpretation is left to each test. default:all*/
#ifdef _WIN64
const char* HIP_VISIBLE_DEVICES_STR = "HIP_VISIBLE_DEVICES=";
const char* CUDA_VISIBLE_DEVICES_STR = "CUDA_VISIBLE_DEVICES=";
const char* PATH_SEPERATOR_STR = "\\";
#else
const char* HIP_VISIBLE_DEVICES_STR = "HIP_VISIBLE_DEVICES";
const char* CUDA_VISIBLE_DEVICES_STR = "CUDA_VISIBLE_DEVICES";
const char* PATH_SEPERATOR_STR = "/";
#endif
namespace HipTest {