Skip to content

Commit

Permalink
Merge branch 'mlperf-inference' into mlperf-inference
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh authored Nov 25, 2024
2 parents 7e6703c + d83fd46 commit bf0bb4a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
11 changes: 8 additions & 3 deletions automation/script/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -5042,7 +5042,8 @@ def find_cached_script(i):
bat_ext = os_info['bat_ext']
script_path = i['found_script_path']

if os.path.exists(os.path.join(script_path, f"validate_cache{bat_ext}")):
if os.path.exists(os.path.join(script_path,
f"validate_cache{bat_ext}")):
run_script_input = {
'path': script_path,
'bat_ext': bat_ext,
Expand Down Expand Up @@ -5072,11 +5073,15 @@ def find_cached_script(i):
#if r['return'] > 0:
# return r

ii = {'run_script_input': run_script_input, 'env': env, 'script_name': 'validate_cache', 'detect_version': True}

ii = {
'run_script_input': run_script_input,
'env': env,
'script_name': 'validate_cache'}
r = self_obj.run_native_script(ii)

if r['return'] > 0:
#return r
# return r
continue

if not skip_cached_script:
Expand Down
3 changes: 3 additions & 0 deletions script/get-generic-python-lib/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ variations:
CM_GENERIC_PYTHON_PACKAGE_NAME: '#'
CM_GENERIC_PYTHON_PIP_UNINSTALL_DEPS: ''
CM_GENERIC_PYTHON_PIP_URL: ''
find_links_url.#:
env:
CM_GENERIC_PYTHON_PIP_EXTRA_FIND_LINKS_URL: '#'
package.torch,cxx11-abi:
env:
CM_GENERIC_PYTHON_PIP_INDEX_URL: https://download.pytorch.org/whl/nightly/cpu-cxx11-abi
Expand Down
8 changes: 8 additions & 0 deletions script/get-generic-python-lib/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import cmind as cm


def preprocess(i):

os_info = i['os_info']
Expand Down Expand Up @@ -103,6 +104,13 @@ def preprocess(i):

extra += ' --extra-index-url ' + extra_index_url

# check find-links
find_links_url = env.get(
'CM_GENERIC_PYTHON_PIP_EXTRA_FIND_LINKS_URL', '').strip()

if find_links_url != '':
extra += ' -f ' + find_links_url

# Check update
if env.get('CM_GENERIC_PYTHON_PIP_UPDATE', '') in [
True, 'true', 'yes', 'on']:
Expand Down

0 comments on commit bf0bb4a

Please sign in to comment.