Skip to content

Commit

Permalink
Added env var to set target.lst
Browse files Browse the repository at this point in the history
Change-Id: Ie6aefba6ef79360e65d4a64a6be1ec50e59b5741
  • Loading branch information
justxi authored and Chris Freehill committed Dec 16, 2019
1 parent 9b0cd9e commit 12736c6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rocm_agent_enumerator
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ def getGCNISA(line, match_from_beginning = False):
def readFromTargetLstFile():
target_list = []

# locate target.lst which should be placed at the same directory with this
# script
target_lst_path = os.path.join(CWD, "target.lst")
# locate target.lst using environment variable or
# it should be placed at the same directory with this script
target_lst_path = os.environ.get("ROCM_TARGET_LST");
if target_lst_path == None:
target_lst_path = os.path.join(CWD, "target.lst")
if os.path.isfile(target_lst_path):
target_lst_file = open(target_lst_path, 'r')
for line in target_lst_file:
Expand Down

0 comments on commit 12736c6

Please sign in to comment.