diff --git a/automation/script/module.py b/automation/script/module.py index e79b33a3e..d72d28493 100644 --- a/automation/script/module.py +++ b/automation/script/module.py @@ -975,7 +975,7 @@ def _run(self, i): if str(state['docker'].get('run', True)).lower() in ['false', '0', 'no']: print (recursion_spaces+' - Skipping script::{} run as we are inside docker'.format(found_script_artifact)) return {'return': 0} - elif str(state['docker'].get('docker_real_run', True)).lower() in ['false', '0', 'no']: + elif str(state['docker'].get('real_run', True)).lower() in ['false', '0', 'no']: print (recursion_spaces+' - Doing fake run for script::{} as we are inside docker'.format(found_script_artifact)) fake_run = True env['CM_TMP_FAKE_RUN']='yes' diff --git a/script/add-custom-nvidia-system/_cm.yaml b/script/add-custom-nvidia-system/_cm.yaml index 6705c3cdc..6dce8414d 100644 --- a/script/add-custom-nvidia-system/_cm.yaml +++ b/script/add-custom-nvidia-system/_cm.yaml @@ -6,7 +6,8 @@ automation_alias: script automation_uid: 5b4e0237da074764 category: "MLPerf benchmark support" - +docker: + real_run: False # User-friendly tags to find this CM script tags: @@ -94,6 +95,13 @@ variations: add_deps_recursive: nvidia-inference-common-code: tags: _ctuning + go: + group: code + add_deps_recursive: + nvidia-inference-common-code: + tags: _go + + versions: @@ -111,3 +119,8 @@ versions: add_deps_recursive: nvidia-inference-common-code: version: r3.1 + + r4.0: + add_deps_recursive: + nvidia-inference-common-code: + version: r4.0 diff --git a/script/app-mlperf-inference-ctuning-cpp-tflite/_cm.json b/script/app-mlperf-inference-ctuning-cpp-tflite/_cm.json index 17caa8047..1d00f3c81 100644 --- a/script/app-mlperf-inference-ctuning-cpp-tflite/_cm.json +++ b/script/app-mlperf-inference-ctuning-cpp-tflite/_cm.json @@ -118,6 +118,10 @@ "tags": "get,ml-model,efficientnet,raw,_tflite" }, { + "names": [ + "tensorflow", + "tflite" + ], "tags": "get,tensorflow,lib,_tflite" }, { diff --git a/script/app-mlperf-inference-mlcommons-python/customize.py b/script/app-mlperf-inference-mlcommons-python/customize.py index ee97038ff..27b03b27a 100644 --- a/script/app-mlperf-inference-mlcommons-python/customize.py +++ b/script/app-mlperf-inference-mlcommons-python/customize.py @@ -177,7 +177,7 @@ def get_run_cmd_reference(os_info, env, scenario_extra_options, mode_extra_optio env['RUN_DIR'] = os.path.join(env['CM_MLPERF_INFERENCE_SOURCE'], "language", "gpt-j") cmd = env['CM_PYTHON_BIN_WITH_PATH'] + \ - " run.py --model-path=" + env['CM_ML_MODEL_FILE_WITH_PATH'] + ' --dataset-path=' + env['CM_DATASET_EVAL_PATH'] + " --scenario " + env['CM_MLPERF_LOADGEN_SCENARIO'] + " " + env['CM_MLPERF_LOADGEN_EXTRA_OPTIONS'] + \ + " main.py --model-path=" + env['CM_ML_MODEL_FILE_WITH_PATH'] + ' --dataset-path=' + env['CM_DATASET_EVAL_PATH'] + " --scenario " + env['CM_MLPERF_LOADGEN_SCENARIO'] + " " + env['CM_MLPERF_LOADGEN_EXTRA_OPTIONS'] + \ ' --dtype ' + env['CM_MLPERF_MODEL_PRECISION'] + \ scenario_extra_options + mode_extra_options + dataset_options cmd = cmd.replace("--count", "--max_examples") diff --git a/script/app-mlperf-inference-nvidia/_cm.yaml b/script/app-mlperf-inference-nvidia/_cm.yaml index 1dd39f879..86abccbeb 100644 --- a/script/app-mlperf-inference-nvidia/_cm.yaml +++ b/script/app-mlperf-inference-nvidia/_cm.yaml @@ -261,7 +261,10 @@ deps: CM_MLPERF_NVIDIA_HARNESS_RUN_MODE: - run_harness - - tags: get,generic-python-lib,_package.nvmitten,_path./opt/nvmitten-0.1.3-cp38-cp38-linux_x86_64.whl + - tags: get,generic-python-lib,_package.nvmitten + update_tags_from_env_with_prefix: + _path.: + - CM_ENV_NVMITTEN_DOCKER_WHEEL_PATH enable_if_env: CM_RUN_STATE_DOCKER: - 'yes' @@ -308,6 +311,23 @@ post_deps: # Variations to customize dependencies variations: + # MLPerf inference version + v4.0: + group: version + default: true + env: + CM_MLPERF_INFERENCE_VERSION: "v4.0" + CM_MLPERF_GPTJ_MODEL_FP8_PATH_SUFFIX: GPTJ-FP8-quantized + adr: + pytorch: + tags: _for-nvidia-mlperf-inference-v4.0 + v3.1: + env: + CM_MLPERF_INFERENCE_VERSION: "v3.1" + CM_MLPERF_GPTJ_MODEL_FP8_PATH_SUFFIX: GPTJ-07142023.pth + adr: + pytorch: + tags: _for-nvidia-mlperf-inference-v3.1 # Target devices cpu: group: device @@ -366,6 +386,7 @@ variations: - tags: get,generic-python-lib,_transformers - tags: get,generic-python-lib,_safetensors - tags: get,generic-python-lib,_onnx + - tags: get,generic-python-lib,_onnx-graphsurgeon bert-99: group: model @@ -476,18 +497,25 @@ variations: deps: - tags: get,generic-python-lib,_package.datasets - tags: get,generic-python-lib,_package.simplejson + - tags: get,generic-python-lib,_onnx + - tags: get,generic-python-lib,_transformers + - tags: get,generic-python-lib,_onnx-graphsurgeon env: CM_ML_MODEL_STARTING_WEIGHTS_FILENAME: "https://cloud.mlcommons.org/index.php/s/QAZ2oM94MkFtbQx/download" gptj_,build: deps: - - tags: install,pytorch,from.src,_for-nvidia-mlperf-inference-v3.1 + - tags: install,pytorch,from.src + names: + - pytorch - tags: get,cmake version_min: "3.25.0" gptj_,build_engine: deps: - - tags: install,pytorch,from.src,_for-nvidia-mlperf-inference-v3.1 + - tags: install,pytorch,from.src + names: + - pytorch - tags: get,cmake version_min: "3.25.0" @@ -877,7 +905,9 @@ variations: gptj_,run_harness: deps: - - tags: install,pytorch,from.src,_for-nvidia-mlperf-inference-v3.1 + - tags: install,pytorch,from.src + names: + - pytorch - tags: get,cmake version_min: "3.25.0" env: diff --git a/script/app-mlperf-inference-nvidia/customize.py b/script/app-mlperf-inference-nvidia/customize.py index 2d995af9c..bbb9cb703 100644 --- a/script/app-mlperf-inference-nvidia/customize.py +++ b/script/app-mlperf-inference-nvidia/customize.py @@ -10,6 +10,9 @@ def preprocess(i): return {'return':1, 'error': 'Windows is not supported in this script yet'} env = i['env'] + if str(env.get('CM_RUN_STATE_DOCKER', '')).lower() in ['1', 'true', 'yes']: + return {'return': 0} + if env.get('CM_MODEL', '') == '': return {'return': 1, 'error': 'Please select a variation specifying the model to run'} @@ -153,7 +156,7 @@ def preprocess(i): cmds.append("make download_data BENCHMARKS='gptj'") fp32_model_path = os.path.join(env['MLPERF_SCRATCH_PATH'], 'models', 'GPTJ-6B', 'checkpoint-final') - fp8_model_path = os.path.join(env['MLPERF_SCRATCH_PATH'], 'models', 'GPTJ-6B', 'fp8-quantized-ammo', 'GPTJ-07142023.pth') + fp8_model_path = os.path.join(env['MLPERF_SCRATCH_PATH'], 'models', 'GPTJ-6B', 'fp8-quantized-ammo', env['CM_MLPERF_GPTJ_MODEL_FP8_PATH_SUFFIX']) vocab_path = os.path.join(env['MLPERF_SCRATCH_PATH'], 'models', 'bert', 'vocab.txt') if not os.path.exists(os.path.dirname(fp32_model_path)): @@ -163,7 +166,8 @@ def preprocess(i): if not os.path.exists(fp32_model_path): env['CM_REQUIRE_GPTJ_MODEL_DOWNLOAD'] = 'yes' # download via prehook_deps - cmds.append(f"cp -r $CM_ML_MODEL_FILE_WITH_PATH {fp32_model_path}") + if make_command == "build_engine": + cmds.append(f"cp -r $CM_ML_MODEL_FILE_WITH_PATH {fp32_model_path}") model_name = "gptj" model_path = fp8_model_path diff --git a/script/app-mlperf-inference/_cm.yaml b/script/app-mlperf-inference/_cm.yaml index c8ff71c11..58f1ca6cb 100644 --- a/script/app-mlperf-inference/_cm.yaml +++ b/script/app-mlperf-inference/_cm.yaml @@ -182,6 +182,8 @@ variations: tags: _float32 librispeech-accuracy-script: tags: _int32 + cnndm-accuracy-script: + tags: _int32 env: CM_MLPERF_PYTHON: 'yes' CM_MLPERF_IMPLEMENTATION: mlcommons_python @@ -189,6 +191,7 @@ variations: CM_IMAGENET_ACCURACY_DTYPE: float32 CM_OPENIMAGES_ACCURACY_DTYPE: float32 CM_LIBRISPEECH_ACCURACY_DTYPE: float32 + CM_CNNDM_ACCURACY_DTYPE: int32 prehook_deps: - names: - python-reference-mlperf-inference @@ -235,6 +238,10 @@ variations: default_variations: backend: onnxruntime + nvidia-original,r4.1_default: + docker: + base_image: nvcr.io/nvidia/mlperf/mlperf-inference:mlpinf-v4.0-cuda12.2-cudnn8.9-x86_64-ubuntu20.04-public + nvidia-original: docker: interactive: True @@ -273,12 +280,6 @@ variations: CM_IMAGENET_ACCURACY_DTYPE: int32 CM_CNNDM_ACCURACY_DTYPE: int32 CM_LIBRISPEECH_ACCURACY_DTYPE: int8 - deps: - - tags: get,cuda-devices - skip_if_env: - CM_CUDA_DEVICE_PROP_GLOBAL_MEMORY: - - "yes" - - "on" prehook_deps: - names: - nvidia-original-mlperf-inference @@ -904,6 +905,12 @@ variations: add_deps_recursive: mlperf-inference-implementation: tags: _cuda + deps: + - tags: get,cuda-devices + skip_if_env: + CM_CUDA_DEVICE_PROP_GLOBAL_MEMORY: + - "yes" + - "on" rocm: docker: all_gpus: 'yes' @@ -1142,6 +1149,25 @@ variations: default_env: CM_SKIP_SYS_UTILS: 'yes' CM_REGENERATE_MEASURE_FILES: 'yes' + env: + CM_ENV_NVMITTEN_DOCKER_WHEEL_PATH: '/opt/nvmitten-0.1.3-cp38-cp38-linux_x86_64.whl' + + r4.1_default: + group: + reproducibility + add_deps_recursive: + nvidia-inference-common-code: + version: r4.0 + tags: _go + nvidia-inference-server: + version: r4.0 + tags: _go + default_env: + CM_SKIP_SYS_UTILS: 'yes' + CM_REGENERATE_MEASURE_FILES: 'yes' + env: + CM_ENV_NVMITTEN_DOCKER_WHEEL_PATH: '/opt/nvmitten-0.1.3b0-cp38-cp38-linux_x86_64.whl' + invalid_variation_combinations: - @@ -1240,6 +1266,7 @@ docker: - tags: get,mlperf,inference,results,dir - tags: get,mlperf,inference,submission,dir pre_run_cmds: + #- cm pull repo && cm run script --tags=get,git,repo,_repo.https://github.com/GATEOverflow/inference_results_v4.0.git --update - cm pull repo mounts: - "${{ CM_DATASET_IMAGENET_PATH }}:${{ CM_DATASET_IMAGENET_PATH }}" diff --git a/script/authenticate-github-cli/_cm.yaml b/script/authenticate-github-cli/_cm.yaml new file mode 100644 index 000000000..605cc955f --- /dev/null +++ b/script/authenticate-github-cli/_cm.yaml @@ -0,0 +1,16 @@ +alias: authenticate-github-cli +automation_alias: script +automation_uid: 5b4e0237da074764 +cache: true +input_mapping: + with_token: CM_GH_AUTH_TOKEN + with-token: CM_GH_AUTH_TOKEN +tags: +- auth +- authenticate +- github +- gh +- cli +uid: 7b57673ac14a4337 +deps: + - tags: get,gh,cli diff --git a/script/authenticate-github-cli/customize.py b/script/authenticate-github-cli/customize.py new file mode 100644 index 000000000..14b762e0f --- /dev/null +++ b/script/authenticate-github-cli/customize.py @@ -0,0 +1,27 @@ +from cmind import utils +import os + +def preprocess(i): + + os_info = i['os_info'] + + env = i['env'] + + meta = i['meta'] + + automation = i['automation'] + + cmd = "gh auth login" + if env.get('CM_GH_AUTH_TOKEN', '') != '': + cmd = f" echo {env['CM_GH_AUTH_TOKEN']} | {cmd} --with-token" + + env['CM_RUN_CMD'] = cmd + quiet = (env.get('CM_QUIET', False) == 'yes') + + return {'return':0} + +def postprocess(i): + + env = i['env'] + + return {'return':0} diff --git a/script/authenticate-github-cli/run.bat b/script/authenticate-github-cli/run.bat new file mode 100644 index 000000000..648302ca7 --- /dev/null +++ b/script/authenticate-github-cli/run.bat @@ -0,0 +1 @@ +rem native script diff --git a/script/authenticate-github-cli/run.sh b/script/authenticate-github-cli/run.sh new file mode 100644 index 000000000..b17d52e4b --- /dev/null +++ b/script/authenticate-github-cli/run.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +#CM Script location: ${CM_TMP_CURRENT_SCRIPT_PATH} + +#To export any variable +#echo "VARIABLE_NAME=VARIABLE_VALUE" >>tmp-run-env.out + +#${CM_PYTHON_BIN_WITH_PATH} contains the path to python binary if "get,python" is added as a dependency + +echo "Running: " +echo "${CM_RUN_CMD}" +echo "" + +if [[ ${CM_FAKE_RUN} != "yes" ]]; then + eval "${CM_RUN_CMD}" + test $? -eq 0 || exit 1 +fi + diff --git a/script/build-mlperf-inference-server-nvidia/_cm.yaml b/script/build-mlperf-inference-server-nvidia/_cm.yaml index 98ee5b922..dc2e2fc5b 100644 --- a/script/build-mlperf-inference-server-nvidia/_cm.yaml +++ b/script/build-mlperf-inference-server-nvidia/_cm.yaml @@ -164,6 +164,11 @@ variations: add_deps_recursive: nvidia-inference-common-code: tags: _ctuning + go: + group: code + add_deps_recursive: + nvidia-inference-common-code: + tags: _go nvidia-only: group: code add_deps_recursive: @@ -180,6 +185,22 @@ variations: nvidia-inference-common-code: tags: _mlcommons + r4.0: + group: version + add_deps_recursive: + nvidia-inference-common-code: + version: r4.0 + nvidia-scratch-space: + tags: _version.4_1 + deps: + - tags: install,pytorch,from.src,_for-nvidia-mlperf-inference-v4.0 + names: + - pytorch + - torch + - tags: install,torchvision,from.src,_for-nvidia-mlperf-inference-v4.0 + names: + - pytorchvision + - torchvision versions: r2.1: @@ -213,6 +234,24 @@ versions: - torchvision - tags: install,nccl,libs,_cuda + r4.0: + add_deps_recursive: + nvidia-inference-common-code: + version: r4.0 + nvidia-scratch-space: + tags: _version.4_1 + env: + BUILD_TRTLLM: 1 + deps: + - tags: install,pytorch,from.src,_for-nvidia-mlperf-inference-v4.0 + names: + - pytorch + - torch + - tags: install,torchvision,from.src,_for-nvidia-mlperf-inference-v4.0 + names: + - pytorchvision + - torchvision + docker: skip_run_cmd: 'no' all_gpus: 'yes' diff --git a/script/get-git-repo/_cm.json b/script/get-git-repo/_cm.json index 3d178f924..39fbcb1d2 100644 --- a/script/get-git-repo/_cm.json +++ b/script/get-git-repo/_cm.json @@ -17,6 +17,7 @@ "folder": "CM_GIT_CHECKOUT_FOLDER", "patch": "CM_GIT_PATCH", "update": "CM_GIT_REPO_PULL", + "pull": "CM_GIT_REPO_PULL", "env_key": "CM_GIT_ENV_KEY", "submodules": "CM_GIT_RECURSE_SUBMODULES" }, diff --git a/script/get-ml-model-gptj/_cm.json b/script/get-ml-model-gptj/_cm.json index f3a3f64b8..d7852c403 100644 --- a/script/get-ml-model-gptj/_cm.json +++ b/script/get-ml-model-gptj/_cm.json @@ -171,6 +171,13 @@ } ] }, + "fp8": { + "env": { + "CM_ML_MODEL_INPUT_DATA_TYPES": "fp8", + "CM_ML_MODEL_WEIGHT_DATA_TYPES": "fp8" + }, + "group": "precision" + }, "int4": { "env": { "CM_ML_MODEL_INPUT_DATA_TYPES": "int4", @@ -193,6 +200,62 @@ "group": "model-provider", "default": true }, + "nvidia": { + "default_variations": { + "framework": "pytorch" + }, + "group": "model-provider", + "env": { + "CM_TMP_ML_MODEL_PROVIDER": "nvidia" + } + }, + "pytorch,nvidia": { + "default_variations": { + "precision": "fp8" + }, + "deps": [ + { + "tags": "get,git,repo,_repo.https://github.com/NVIDIA/TensorRT-LLM.git,_sha.0ab9d17a59c284d2de36889832fe9fc7c8697604", + "extra_cache_tags": "tensorrt-llm", + "env": { + "CM_GIT_CHECKOUT_PATH_ENV_NAME": "CM_TENSORRT_LLM_CHECKOUT_PATH" + } + }, + { + "tags": "get,cuda", + "names": [ + "cuda" + ] + }, + { + "tags": "get,nvidia,scratch,space" + }, + { + "tags": "get,cuda-devices" + }, + { + "tags": "get,ml-model,gpt-j,_fp32,_pytorch", + "env": { + }, + "force_new_env_keys": [ + "GPTJ_CHECKPOINT_PATH" + ] + }, + { + "tags": "get,nvidia,inference,common-code", + "names": [ + "nvidia-inference-common-code" + ] + }, + { + "tags": "get,python3", + "names": [ + "python", + "python3" + ] + } + ] + }, "intel": { "default_variations": { "framework": "pytorch" diff --git a/script/get-ml-model-gptj/customize.py b/script/get-ml-model-gptj/customize.py index d719f0095..4a22ff2ec 100644 --- a/script/get-ml-model-gptj/customize.py +++ b/script/get-ml-model-gptj/customize.py @@ -21,6 +21,12 @@ def preprocess(i): env['INT8_MODEL_DIR'] = os.getcwd() else: env['INT4_MODEL_DIR'] = os.getcwd() + elif env.get('CM_TMP_ML_MODEL_PROVIDER', '') == 'nvidia': + i['run_script_input']['script_name'] = 'run-nvidia' + gpu_arch = int(float(env['CM_CUDA_DEVICE_PROP_GPU_COMPUTE_CAPABILITY']) * 10) + env['CM_GPU_ARCH'] = gpu_arch + env['CM_TMP_REQUIRE_DOWNLOAD'] = 'no' + else: is_saxml = env.get('CM_TMP_MODEL_SAXML','') if is_saxml == "fp32": diff --git a/script/get-ml-model-gptj/run-nvidia.sh b/script/get-ml-model-gptj/run-nvidia.sh new file mode 100644 index 000000000..b115f7838 --- /dev/null +++ b/script/get-ml-model-gptj/run-nvidia.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [[ ! -e ${CM_NVIDIA_MLPERF_SCRATCH_PATH}/models/GPTJ-6B/checkpoint-final ]]; then + cp -r ${GPTJ_CHECKPOINT_PATH} ${CM_NVIDIA_MLPERF_SCRATCH_PATH}/models/GPTJ-6B/ + test $? -eq 0 || exit $? +fi + +echo "cd ${CM_TENSORRT_LLM_CHECKOUT_PATH}" +cd ${CM_TENSORRT_LLM_CHECKOUT_PATH} + +make -C docker build +test $? -eq 0 || exit $? + +RUN_CMD="bash -c '${CM_PYTHON_BIN_WITH_PATH} scripts/build_wheel.py -a=${CM_GPU_ARCH} --clean --install --trt_root /usr/local/tensorrt/ && python examples/quantization/quantize.py --dtype=float16 --output_dir=/mnt/models/GPTJ-6B/fp8-quantized-ammo/GPTJ-FP8-quantized --model_dir=/mnt/models/GPTJ-6B/checkpoint-final --qformat=fp8 --kv_cache_dtype=fp8 '" +DOCKER_RUN_ARGS=" -v ${CM_NVIDIA_MLPERF_SCRATCH_PATH}:/mnt" +export DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS" +export RUN_CMD="$RUN_CMD" +make -C docker run LOCAL_USER=1 +test $? -eq 0 || exit $? + +${CM_PYTHON_BIN_WITH_PATH} ${CM_MLPERF_INFERENCE_NVIDIA_CODE_PATH}/code/gptj/tensorrt/onnx_tune.py --fp8-scalers-path=${CM_NVIDIA_MLPERF_SCRATCH_PATH}/models/GPTJ-6B/fp8-quantized-ammo/GPTJ-FP8-quantized/rank0.safetensors --scaler 1.005 --index 15 +test $? -eq 0 || exit $? diff --git a/script/get-mlperf-inference-nvidia-common-code/_cm.json b/script/get-mlperf-inference-nvidia-common-code/_cm.json index 46f12477e..7b47209ca 100644 --- a/script/get-mlperf-inference-nvidia-common-code/_cm.json +++ b/script/get-mlperf-inference-nvidia-common-code/_cm.json @@ -39,6 +39,9 @@ }, "nvidia-only": { "group": "repo-owner" + }, + "go": { + "group": "repo-owner" } }, "versions": { @@ -62,6 +65,13 @@ "version": "v3.1" } } + }, + "r4.0": { + "add_deps_recursive": { + "mlperf-inference-results": { + "version": "v4.0" + } + } } } } diff --git a/script/get-mlperf-inference-results/_cm.json b/script/get-mlperf-inference-results/_cm.json index 46feecd04..f4870d57f 100644 --- a/script/get-mlperf-inference-results/_cm.json +++ b/script/get-mlperf-inference-results/_cm.json @@ -57,6 +57,12 @@ "CM_MLPERF_INFERENCE_RESULTS_VERSION_NAME": "v3.1", "CM_GIT_URL": "https://github.com/<<>>/inference_results_v3.1.git" } + }, + "v4.0": { + "env": { + "CM_MLPERF_INFERENCE_RESULTS_VERSION_NAME": "v4.0", + "CM_GIT_URL": "https://github.com/<<>>/inference_results_v4.0.git" + } } }, "variations": { @@ -85,6 +91,12 @@ "GITHUB_REPO_OWNER": "GATEOverflow", "NVIDIA_ONLY": "yes" } + }, + "go": { + "group": "source-repo", + "env": { + "GITHUB_REPO_OWNER": "GATEOverflow" + } } } } diff --git a/script/install-ipex-from-src/_cm.json b/script/install-ipex-from-src/_cm.json index f7bb3d675..630007d4f 100644 --- a/script/install-ipex-from-src/_cm.json +++ b/script/install-ipex-from-src/_cm.json @@ -124,6 +124,7 @@ "conda-package", "setuptools" ], + "version": "69.5.1", "tags": "get,generic,conda-package,_package.setuptools,_source.conda-forge" }, { diff --git a/script/install-llvm-src/_cm.json b/script/install-llvm-src/_cm.json index 42e7e20df..f15d4059c 100644 --- a/script/install-llvm-src/_cm.json +++ b/script/install-llvm-src/_cm.json @@ -299,7 +299,9 @@ "tags": "get,generic-python-lib,_custom-python,_package.setuptools", "env": { "CM_PYTHON_BIN_WITH_PATH": "<<>>/python3" - } + }, + "version_max": "69.9.999", + "version_max_usable": "58.2.0" }, { "tags": "get,generic-python-lib,_custom-python,_package.neural-compressor,_url.git+https://github.com/intel/neural-compressor.git@a2931eaa4052eec195be3c79a13f7bfa23e54473", diff --git a/script/install-pytorch-from-src/_cm.json b/script/install-pytorch-from-src/_cm.json index 057dbe681..67441d2bf 100644 --- a/script/install-pytorch-from-src/_cm.json +++ b/script/install-pytorch-from-src/_cm.json @@ -202,7 +202,8 @@ "conda-package", "setuptools" ], - "tags": "get,generic,conda-package,_package.setuptools,_source.conda-forge" + "tags": "get,generic,conda-package,_package.setuptools,_source.conda-forge", + "version": "69.5.1" }, { "names": [ @@ -220,6 +221,23 @@ } ] }, + "for-nvidia-mlperf-inference-v4.0": { + "base": [ + "sha.32f93b1", + "cuda" + ], + "deps": [ + { + "tags": "get,cmake", + "version_min": "3.25.0" + } + ], + "ad": { + "pytorch-src-repo": { + "tags": "_no-recurse-submodules,_full-history" + } + } + }, "for-nvidia-mlperf-inference-v3.1": { "base": [ "sha.b5021ba9", diff --git a/script/install-tensorflow-from-src/_cm.json b/script/install-tensorflow-from-src/_cm.json index da28df774..059a62863 100644 --- a/script/install-tensorflow-from-src/_cm.json +++ b/script/install-tensorflow-from-src/_cm.json @@ -65,13 +65,15 @@ "deps": [ { "tags": "get,python", - "version_max": "3.10.999", - "version_min": "3.7.0", + "version_max": "3.12.999", + "version_min": "3.9.0", "names":["python","python3"] }, { - "tags": "gcc,get", - "version_min": "9.3" + "tags": "get,llvm", + "version_min": "17.0.6", + "version_max": "17.9.99", + "version_max_usable": "17.0.6" }, { "tags": "get,bazel", @@ -333,6 +335,165 @@ "env": { "CM_GIT_CHECKOUT": "v2.9.0" } + }, + "v2.10.0": { + "deps": [ + { + "tags": "get,python", + "version_max": "3.10.999", + "version_max_usable": "3.10.12", + "version_min": "3.7.0", + "names":["python","python3"] + }, + { + "tags": "gcc,get", + "version_max": "10", + "version_min": "9" + }, + { + "tags": "get,bazel", + "version": "5.1.1" + } + ], + "env": { + "CM_GIT_CHECKOUT": "v2.10.0" + } + }, + "v2.11.0": { + "deps": [ + { + "tags": "get,python", + "version_max": "3.10.999", + "version_max_usable": "3.10.12", + "version_min": "3.7.0", + "names":["python","python3"] + }, + { + "tags": "gcc,get", + "version_max": "10", + "version_min": "9" + }, + { + "tags": "get,bazel", + "version": "5.3.0" + } + ], + "env": { + "CM_GIT_CHECKOUT": "v2.11.0" + } + }, + "v2.12.0": { + "deps": [ + { + "tags": "get,python", + "version_max": "3.11.999", + "version_max_usable": "3.11.12", + "version_min": "3.7.0", + "names":["python","python3"] + }, + { + "tags": "gcc,get", + "version_max": "12", + "version_min": "9" + }, + { + "tags": "get,bazel", + "version": "5.3.0" + } + ], + "env": { + "CM_GIT_CHECKOUT": "v2.12.0" + } + }, + "v2.13.0": { + "deps": [ + { + "tags": "get,python", + "version_max": "3.11.999", + "version_max_usable": "3.11.12", + "version_min": "3.8.0", + "names":["python","python3"] + }, + { + "tags": "get,llvm", + "version": "16.0.0" + }, + { + "tags": "get,bazel", + "version": "5.3.0" + } + ], + "env": { + "CM_GIT_CHECKOUT": "v2.13.0" + } + }, + "v2.14.0": { + "deps": [ + { + "tags": "get,python", + "version_max": "3.11.999", + "version_max_usable": "3.11.12", + "version_min": "3.9.0", + "names":["python","python3"] + }, + { + "tags": "get,llvm", + "version": "16.0.0" + }, + { + "tags": "get,bazel", + "version": "6.1.0" + } + ], + "env": { + "CM_GIT_CHECKOUT": "v2.14.0" + } + }, + "v2.15.0": { + "deps": [ + { + "tags": "get,python", + "version_max": "3.11.999", + "version_max_usable": "3.11.12", + "version_min": "3.9.0", + "names":["python","python3"] + }, + { + "tags": "get,llvm", + "version": "16.0.0" + }, + { + "tags": "get,bazel", + "version": "6.1.0" + } + ], + "env": { + "CM_GIT_CHECKOUT": "v2.15.0" + } + }, + "v2.16.1": { + "deps": [ + { + "tags": "get,python", + "version_max": "3.12.999", + "version_max_usable": "3.11.12", + "version_min": "3.9.0", + "names":["python","python3"] + }, + { + "tags": "get,llvm", + "version_min": "16.0.0", + "version_max_usable": "17.0.6", + "version_max": "17.9.999" + }, + { + "tags": "get,bazel", + "version": "6.5.0" + } + ], + "env": { + "CM_GIT_CHECKOUT": "v2.16.1" + } } } } diff --git a/script/install-tensorflow-from-src/customize.py b/script/install-tensorflow-from-src/customize.py index 646c4f7de..3ddee9a90 100644 --- a/script/install-tensorflow-from-src/customize.py +++ b/script/install-tensorflow-from-src/customize.py @@ -6,6 +6,10 @@ def preprocess(i): if os_info['platform'] == 'windows': return {'return':1, 'error': 'Windows is not supported in this script yet'} + env = i['env'] + + env['CC'] = env['CM_C_COMPILER_WITH_PATH'] + return {'return':0} def postprocess(i): diff --git a/script/install-torchvision-from-src/_cm.json b/script/install-torchvision-from-src/_cm.json index a474bb484..f0e72134b 100644 --- a/script/install-torchvision-from-src/_cm.json +++ b/script/install-torchvision-from-src/_cm.json @@ -94,6 +94,19 @@ "TORCH_CXX_FLAGS": "-D_GLIBCXX_USE_CXX11_ABI=1" } }, + "for-nvidia-mlperf-inference-v4.0": { + "base": [ + "sha.657027f3", + "cuda" + ], + "deps": [ + { + "tags": "install,pytorch,from.src,_for-nvidia-mlperf-inference-v4.0" + } + ], + "env": { + } + }, "for-nvidia-mlperf-inference-v3.1": { "base": [ "sha.657027f3", @@ -102,7 +115,7 @@ "deps": [ { "tags": "install,pytorch,from.src,_for-nvidia-mlperf-inference-v3.1" - } + } ], "env": { } diff --git a/script/install-tpp-pytorch-extension/_cm.json b/script/install-tpp-pytorch-extension/_cm.json index 4b3ce8659..83cf74ed3 100644 --- a/script/install-tpp-pytorch-extension/_cm.json +++ b/script/install-tpp-pytorch-extension/_cm.json @@ -120,6 +120,7 @@ "conda-package", "setuptools" ], + "version": "69.5.1", "tags": "get,generic,conda-package,_package.setuptools,_source.conda-forge" }, { diff --git a/script/process-mlperf-accuracy/customize.py b/script/process-mlperf-accuracy/customize.py index f7b13c16d..895227b44 100644 --- a/script/process-mlperf-accuracy/customize.py +++ b/script/process-mlperf-accuracy/customize.py @@ -25,7 +25,7 @@ def preprocess(i): results_dir_split = results_dir.split(xsep) dataset = env['CM_DATASET'] - regenerate_accuracy_file = env.get('CM_MLPERF_REGENERATE_ACCURACY_FILE', False) + regenerate_accuracy_file = env.get('CM_MLPERF_REGENERATE_ACCURACY_FILE', env.get('CM_RERUN', False)) for result_dir in results_dir_split: @@ -105,9 +105,7 @@ def preprocess(i): else: return {'return': 1, 'error': 'Unsupported dataset'} - outfile = os.path.join(result_dir, "accuracy.txt") - if not os.path.exists(outfile) or (os.stat(outfile).st_size == 0) or env.get("CM_REGENERATE_MEASURE_FILES", False): - run_cmds.append(CMD) + run_cmds.append(CMD) if os_info['platform'] == 'windows': diff --git a/script/run-mlperf-inference-app/_cm.yaml b/script/run-mlperf-inference-app/_cm.yaml index b0a82a344..be61dae5c 100644 --- a/script/run-mlperf-inference-app/_cm.yaml +++ b/script/run-mlperf-inference-app/_cm.yaml @@ -37,6 +37,7 @@ default_env: input_mapping: backend: CM_MLPERF_BACKEND + beam_size: GPTJ_BEAM_SIZE category: CM_MLPERF_SUBMISSION_SYSTEM_TYPE clean: CM_MLPERF_CLEAN_ALL compliance: CM_MLPERF_LOADGEN_COMPLIANCE @@ -253,6 +254,12 @@ variations: CM_RUN_MLPERF_INFERENCE_APP_DEFAULTS: r4.0_default group: benchmark-version + r4.1: + env: + CM_MLPERF_INFERENCE_VERSION: '4.1' + CM_RUN_MLPERF_INFERENCE_APP_DEFAULTS: r4.1_default + group: benchmark-version + short: add_deps_recursive: submission-checker: diff --git a/script/run-mlperf-inference-app/customize.py b/script/run-mlperf-inference-app/customize.py index 4095eeb2c..861207c29 100644 --- a/script/run-mlperf-inference-app/customize.py +++ b/script/run-mlperf-inference-app/customize.py @@ -244,8 +244,7 @@ def preprocess(i): if state.get("cm-mlperf-inference-results"): #print(state["cm-mlperf-inference-results"]) for sut in state["cm-mlperf-inference-results"]:#only one sut will be there - # Grigori: that may not work properly since customize may have another Python than MLPerf - # (for example, if we use virtual env) + # Better to do this in a stand alone CM script with proper deps but currently we manage this by modifying the sys path of the python executing CM import mlperf_utils print(sut)