Skip to content

Commit 90441b5

Browse files
committed
fix small errors in test.py
1 parent 4859243 commit 90441b5

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

scripts/test.py

+4-14
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ def runConfig(config):
231231
elif (compiler.startswith("dpcpp")):
232232

233233
if os.environ["DPCPP_ROOT"] and os.environ["GFX_DRIVER_ROOT"] :
234-
DPCPP_VERSION = os.environ["DPCPP_VERSION"]
235-
GFX_VERSION = os.environ["GFX_DRIVER_VERSION"]
236234
dpcpp_dir = os.environ["DPCPP_ROOT"]
237235
gfx_dir = os.environ["GFX_DRIVER_ROOT"]
238236
else :
@@ -273,17 +271,13 @@ def runConfig(config):
273271
conf.append("-D CMAKE_CXX_COMPILER=icpx -D CMAKE_C_COMPILER=icx")
274272
if enable_sycl_support:
275273
if os.environ["GFX_DRIVER_ROOT"] :
276-
GFX_VERSION = os.environ["GFX_DRIVER_VERSION"]
277-
gfx_dir = os.environ["GFX_DRIVER_ROOT"]
274+
gfx_dir = os.environ["GFX_DRIVER_ROOT"] + "/install"
278275
else :
279276
print("Error GFX_DRIVER_ROOT is not set")
280277
sys.exit(1)
281278

282279
# set up backend
283280
env.append("export SYCL_DEVICE_FILTER=level_zero")
284-
285-
gfx_dir = ""+NAS+"/gfx-driver-linux/"+GFX_VERSION+"/install"
286-
287281
sys.stderr.write("gfx_dir = "+gfx_dir+"\n")
288282

289283
env.append("export PATH="+gfx_dir+"/usr/bin:"+gfx_dir+"/usr/local/bin:$PATH")
@@ -302,10 +296,8 @@ def runConfig(config):
302296
elif (compiler.startswith("dpcpp")):
303297

304298
if os.environ["DPCPP_ROOT"] and os.environ["GFX_DRIVER_ROOT"] :
305-
DPCPP_VERSION = os.environ["DPCPP_VERSION"]
306-
GFX_VERSION = os.environ["GFX_DRIVER_VERSION"]
307299
dpcpp_dir = os.environ["DPCPP_ROOT"]
308-
gfx_dir = os.environ["GFX_DRIVER_ROOT"]+"/install"
300+
gfx_dir = os.environ["GFX_DRIVER_ROOT"] + "/install"
309301
else :
310302
print("Error DPCPP_ROOT or GFX_DRIVER_ROOT is not set")
311303
sys.exit(1)
@@ -552,12 +544,10 @@ def runConfig(config):
552544
if OS == "linux" and compiler.startswith("dpcpp"):
553545
# some additional debug output of gfx and dpcpp version
554546
which_clang = str(subprocess.check_output(escape(" && ".join(env)) + " && which clang++", shell=True, stderr=subprocess.PIPE).decode('utf-8').rstrip("\n"))
555-
print("DEBUG - DPCPP version:", DPCPP_VERSION, " - which clang++: ", which_clang)
556-
assert which_clang == NAS+"/dpcpp-compiler-linux/"+DPCPP_VERSION+"/bin/clang++"
547+
print("DEBUG - DPCPP version:", dpcpp_dir, " - which clang++: ", which_clang)
557548

558549
which_ocloc = str(subprocess.check_output(escape(" && ".join(env)) + " && which ocloc", shell=True, stderr=subprocess.PIPE).decode('utf-8').rstrip("\n"))
559-
print("DEBUG - GFX version:", GFX_VERSION, " - which ocloc: ", which_ocloc)
560-
assert which_ocloc == NAS+"/gfx-driver-linux/"+GFX_VERSION+"/install/usr/bin/ocloc" or which_ocloc == NAS+"/gfx-driver-linux/"+GFX_VERSION+"/install/usr/local/bin/ocloc"
550+
print("DEBUG - GFX version:", gfx_dir, " - which ocloc: ", which_ocloc)
561551

562552
if rtcore:
563553
conf.append("-D EMBREE_CONFIG="+(",".join(rtcore)))

0 commit comments

Comments
 (0)