From 0b048afa79db763609eff2bc246f2a0d6f503fec Mon Sep 17 00:00:00 2001 From: pensun Date: Thu, 3 Mar 2016 06:23:17 -0600 Subject: [PATCH] Fix for hipEnvVar test for titan machine --- hipamd/tests/src/hipEnvVar.cpp | 8 ++------ hipamd/tests/src/hipEnvVarDriver.cpp | 7 +++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hipamd/tests/src/hipEnvVar.cpp b/hipamd/tests/src/hipEnvVar.cpp index 2b2b0afcff..c1b6589fe2 100644 --- a/hipamd/tests/src/hipEnvVar.cpp +++ b/hipamd/tests/src/hipEnvVar.cpp @@ -44,7 +44,7 @@ int main(int argc, char **argv) //std::cout << "The current env HIP_VISIBLE_DEVICES is"< 2){ setenv("HIP_VISIBLE_DEVICES","0,1,1000,2",1); + setenv("CUDA_VISIBLE_DEVICES","0,1,1000,2",1); assert(getDeviceNumber() == 2); setenv("HIP_VISIBLE_DEVICES","0,1,2",1); + setenv("CUDA_VISIBLE_DEVICES","0,1,2",1); assert(getDeviceNumber() == 3); // test if CUDA_VISIBLE_DEVICES will be accepted by the runtime unsetenv("HIP_VISIBLE_DEVICES"); + unsetenv("CUDA_VISIBLE_DEVICES"); setenv("CUDA_VISIBLE_DEVICES","0,1,2",1); assert(getDeviceNumber() == 3); } setenv("HIP_VISIBLE_DEVICES","-100,0,1",1); + setenv("CUDA_VISIBLE_DEVICES","-100,0,1",1); assert(getDeviceNumber() == 0); std::cout << "PASSED" << std::endl;