aboutsummaryrefslogtreecommitdiff
blob: 78d46734925b635e47aeb4ae384d960bccbb67a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Index: Tensile-rocm-4.0.0/Tensile/Common.py
===================================================================
--- Tensile-rocm-4.0.0.orig/Tensile/Common.py
+++ Tensile-rocm-4.0.0/Tensile/Common.py
@@ -155,7 +155,7 @@ globalParameters["PrintTensorRef"] = 0
 globalParameters["PrintIndexAssignments"] = 0      # Print the tensor index assignment info
 globalParameters["PrintTensorRef"] = 0          # Print reference tensor.  0x1=after init; 0x2=after copy-back; 0x3=both
 globalParameters["PrintWinnersOnly"] = False      # Only print the solutions which become the fastest
-globalParameters["PrintCodeCommands"] = False  # print the commands used to generate the code objects (asm,link,hip-clang, etc)
+globalParameters["PrintCodeCommands"] = True  # print the commands used to generate the code objects (asm,link,hip-clang, etc)
 
 # TODO - remove this when NewClient is mainstream
 globalParameters["OldClientSourceTmp"] = True      # Use an intermediate sourceTmp dir to detect file changes and minimize rebuilds on old client
@@ -1521,14 +1521,14 @@ def assignGlobalParameters( config ):
       print2(" %24s: %8s (unspecified)" % (key, defaultValue))
 
   # ROCm Agent Enumerator Path
-  globalParameters["ROCmAgentEnumeratorPath"] = locateExe("/opt/rocm/bin", "rocm_agent_enumerator")
+  globalParameters["ROCmAgentEnumeratorPath"] = locateExe("", "rocm_agent_enumerator")
   if "CxxCompiler" in config:
     globalParameters["CxxCompiler"] = config["CxxCompiler"]
 
   if "TENSILE_ROCM_ASSEMBLER_PATH" in os.environ:
     globalParameters["AssemblerPath"] = os.environ.get("TENSILE_ROCM_ASSEMBLER_PATH")
   elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hipcc":
-    globalParameters["AssemblerPath"] = locateExe("/opt/rocm/llvm/bin", "clang++")
+    globalParameters["AssemblerPath"] = locateExe("", "clang++")
   elif globalParameters["AssemblerPath"] is None and globalParameters["CxxCompiler"] == "hcc":
     globalParameters["AssemblerPath"] = locateExe("/opt/rocm/bin", "hcc")
 
@@ -1536,8 +1536,8 @@ def assignGlobalParameters( config ):
   if globalParameters["CxxCompiler"] == "hcc":
     globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/bin", "extractkernel")
   else:
-    globalParameters["ExtractKernelPath"] = locateExe("/opt/rocm/hip/bin", "extractkernel")
-    globalParameters["ClangOffloadBundlerPath"] = locateExe("/opt/rocm/llvm/bin", "clang-offload-bundler")
+    globalParameters["ExtractKernelPath"] = locateExe("", "extractkernel")
+    globalParameters["ClangOffloadBundlerPath"] = locateExe("", "clang-offload-bundler")
 
   if "ROCmAgentEnumeratorPath" in config:
     globalParameters["ROCmAgentEnumeratorPath"] = config["ROCmAgentEnumeratorPath"]
@@ -1579,20 +1579,6 @@ def assignGlobalParameters( config ):
   # Due to platform.linux_distribution() being deprecated, just try to run dpkg regardless.
   # The alternative would be to install the `distro` package.
   # See https://docs.python.org/3.7/library/platform.html#platform.linux_distribution
-  try:
-    if globalParameters["CxxCompiler"] == "hipcc":
-      output = subprocess.run(["dpkg", "-l", "hip-rocclr"], check=True, stdout=subprocess.PIPE).stdout.decode()
-    elif globalParameters["CxxCompiler"] == "hcc":
-      output = subprocess.run(["dpkg", "-l", "hcc"], check=True, stdout=subprocess.PIPE).stdout.decode()
-
-    for line in output.split('\n'):
-      if 'hipcc' in line:
-        globalParameters['HipClangVersion'] = line.split()[2]
-      elif 'hcc' in line:
-        globalParameters['HccVersion'] = line.split()[2]
-
-  except (subprocess.CalledProcessError, OSError) as e:
-      printWarning("Error: {} looking for package {}: {}".format('dpkg', 'hip-rocclr', e))
 
   for key in config:
     value = config[key]