diff --git a/.github/scripts/fbgemm_gpu_install.bash b/.github/scripts/fbgemm_gpu_install.bash index c58d7fd6a..6bd60c757 100644 --- a/.github/scripts/fbgemm_gpu_install.bash +++ b/.github/scripts/fbgemm_gpu_install.bash @@ -68,10 +68,9 @@ install_fbgemm_gpu_wheel () { install_fbgemm_gpu_pip () { local env_name="$1" local fbgemm_gpu_channel_version="$2" - local fbgemm_gpu_variant_type="$3" - local fbgemm_gpu_variant_version="$4" - if [ "$fbgemm_gpu_variant_type" == "" ]; then - echo "Usage: ${FUNCNAME[0]} ENV_NAME FBGEMM_GPU_VERSION FBGEMM_GPU_VARIANT_TYPE [FBGEMM_GPU_VARIANT_VERSION]" + local fbgemm_gpu_variant_type_version="$3" + if [ "$fbgemm_gpu_variant_type_version" == "" ]; then + echo "Usage: ${FUNCNAME[0]} ENV_NAME FBGEMM_GPU_CHANNEL[/VERSION] FBGEMM_GPU_VARIANT_TYPE[/VARIANT_VERSION]" echo "Example(s):" echo " ${FUNCNAME[0]} build_env 0.5.0 cpu # Install the CPU variant, specific version from release channel" echo " ${FUNCNAME[0]} build_env release cuda 12.1.1 # Install the CUDA variant, latest version from release channel" @@ -89,7 +88,7 @@ install_fbgemm_gpu_pip () { # Install the package from PyTorch PIP (not PyPI) # The package's canonical name is 'fbgemm-gpu' (hyphen, not underscore) - install_from_pytorch_pip "${env_name}" fbgemm_gpu "${fbgemm_gpu_channel_version}" "${fbgemm_gpu_variant_type}" "${fbgemm_gpu_variant_version}" || return 1 + install_from_pytorch_pip "${env_name}" fbgemm_gpu "${fbgemm_gpu_channel_version}" "${fbgemm_gpu_variant_type_version}" || return 1 # Run post-installation checks __fbgemm_gpu_post_install_checks "${env_name}" || return 1 diff --git a/.github/scripts/fbgemm_gpu_test.bash b/.github/scripts/fbgemm_gpu_test.bash index 0325a257d..cc7fed77b 100644 --- a/.github/scripts/fbgemm_gpu_test.bash +++ b/.github/scripts/fbgemm_gpu_test.bash @@ -182,7 +182,7 @@ test_setup_conda_environment () { if [ "$pytorch_installer" == "conda" ]; then install_pytorch_conda "${env_name}" "${pytorch_version}" "${pytorch_variant_type}" "${pytorch_variant_version}" || return 1 else - install_pytorch_pip "${env_name}" "${pytorch_version}" "${pytorch_variant_type}" "${pytorch_variant_version}" || return 1 + install_pytorch_pip "${env_name}" "${pytorch_version}" "${pytorch_variant_type}"/"${pytorch_variant_version}" || return 1 fi } diff --git a/.github/scripts/utils_pip.bash b/.github/scripts/utils_pip.bash index c92b36173..91967e166 100644 --- a/.github/scripts/utils_pip.bash +++ b/.github/scripts/utils_pip.bash @@ -13,37 +13,15 @@ # PyTorch PIP Install Functions ################################################################################ -__extract_pip_arguments () { - export env_name="$1" - export package_name_raw="$2" - export package_channel_version="$3" - export package_variant_type="$4" - export package_variant_version="$5" - if [ "$package_variant_type" == "" ]; then - echo "Usage: ${FUNCNAME[0]} ENV_NAME PACKAGE_NAME PACKAGE_CHANNEL_VERSION PACKAGE_VARIANT_TYPE [PACKAGE_VARIANT_VERSION]" - echo "Example(s):" - echo " ${FUNCNAME[0]} build_env torch 1.11.0 cpu # Install the CPU variant, specific version from release channel" - echo " ${FUNCNAME[0]} build_env torch release cpu # Install the CPU variant, latest version from release channel" - echo " ${FUNCNAME[0]} build_env fbgemm_gpu test/0.6.0rc0 cuda 12.1.0 # Install the CUDA 12.1 variant, specific version from test channel" - echo " ${FUNCNAME[0]} build_env fbgemm_gpu nightly rocm 5.3 # Install the ROCM 5.3 variant, latest version from nightly channel" - return 1 - else - echo "################################################################################" - echo "# Extract PIP Arguments (PyTorch PIP)" - echo "#" - echo "# [$(date --utc +%FT%T.%3NZ)] + ${FUNCNAME[0]} ${*}" - echo "################################################################################" - echo "" - fi - - test_network_connection || return 1 +__export_package_channel_info () { + local package_channel_version="$1" # Extract the package channel and version from the tuple-string if [ "$package_channel_version" == "nightly" ] || [ "$package_channel_version" == "test" ] || [ "$package_channel_version" == "release" ]; then export package_channel="$package_channel_version" export package_version="" else - # shellcheck disable=SC2207 + # shellcheck disable=SC2207 local package_channel_version_arr=($(echo "${package_channel_version}" | tr '/' '\n')) if [ ${#package_channel_version_arr[@]} -lt 2 ]; then export package_channel="release" @@ -53,34 +31,73 @@ __extract_pip_arguments () { export package_version="${package_channel_version_arr[1]}" fi fi - echo "[INSTALL] Extracted package (channel, version): (${package_channel}, ${package_version})" + if [ "$package_channel" != "nightly" ] && [ "$package_channel" != "test" ] && [ "$package_channel" != "release" ]; then + echo "[INSTALL] Invalid PyTorch PIP package channel: ${package_channel}" + return 1 + fi + echo "[INSTALL] Extracted package (channel, version): (${package_channel}, ${package_version:-LATEST})" +} - # Replace underscores with hyphens to materialize the canonical name of the package - # shellcheck disable=SC2155 - export package_name=$(echo "${package_name_raw}" | tr '_' '-') +__export_package_variant_info () { + local package_variant_type_version="$1" + + local FALLBACK_VERSION_CUDA="12.1.1" + local FALLBACK_VERSION_ROCM="5.7.0" + + if [ "$package_variant_type_version" == "cuda" ]; then + # If "cuda", default to latest CUDA + local variant_type="cu" + local variant_version="$FALLBACK_VERSION_CUDA" + + elif [ "$package_variant_type_version" == "rocm" ]; then + # If "rocm", default to latest ROCm + local variant_type="rocm" + local variant_version="$FALLBACK_VERSION_ROCM" + + elif [ "$package_variant_type_version" == "cpu" ]; then + # If "cpu", default to latest cpu + local variant_type="cpu" + local variant_version="" - # Set the package variant - if [ "$package_variant_type" == "cuda" ]; then - # Extract the CUDA version or default to 12.1.0 - local cuda_version="${package_variant_version:-12.1.0}" - # shellcheck disable=SC2206 - local cuda_version_arr=(${cuda_version//./ }) - # Convert, i.e. cuda 12.1.0 => cu121 - export package_variant="cu${cuda_version_arr[0]}${cuda_version_arr[1]}" - elif [ "$package_variant_type" == "rocm" ]; then - # Extract the ROCM version or default to 5.7.0 - local rocm_version="${package_variant_version:-5.7.0}" - # shellcheck disable=SC2206 - local rocm_version_arr=(${rocm_version//./ }) - # Convert, i.e. rocm 5.5.1 => rocm5.5 - export package_variant="rocm${rocm_version_arr[0]}.${rocm_version_arr[1]}" else - echo "[INSTALL] Invalid package variant type $package_variant_type, defaulting to cpu" - export package_variant_type="cpu" - export package_variant="cpu" + # Split along '/', e.g. cuda/12.1.0 + # shellcheck disable=SC2207 + local package_variant_type_version_arr=($(echo "${package_variant_type_version}" | tr '/' '\n')) + local variant_type="${package_variant_type_version_arr[0]}" + local variant_version="${package_variant_type_version_arr[1]}" + + if [ "$variant_type" == "cuda" ]; then + # Extract the CUDA version or set to default + local cuda_version="${variant_version:-${FALLBACK_VERSION_CUDA}}" + # shellcheck disable=SC2206 + local cuda_version_arr=(${cuda_version//./ }) + # Convert, i.e. cuda 12.1.0 => cu121 + local variant_type="cu" + local variant_version="${cuda_version_arr[0]}${cuda_version_arr[1]}" + + elif [ "$variant_type" == "rocm" ]; then + # Extract the ROCM version or set to default + local rocm_version="${variant_version:-${FALLBACK_VERSION_ROCM}}" + # shellcheck disable=SC2206 + local rocm_version_arr=(${rocm_version//./ }) + # Convert, i.e. rocm 5.5.1 => rocm5.5 + local variant_type="rocm" + local variant_version="${rocm_version_arr[0]}.${rocm_version_arr[1]}" + + else + echo "[INSTALL] Package variant type '$variant_type' is neither CUDA nor ROCm variant, falling back to cpu" + local variant_type="cpu" + local variant_version="" + fi fi + + # Export the extracted information + export package_variant_type="${variant_type}" + export package_variant="${variant_type}${variant_version}" echo "[INSTALL] Extracted package variant: ${package_variant}" +} +__export_pip_arguments () { # Extract the PIP channel if [ "$package_channel" == "release" ]; then export pip_channel="https://download.pytorch.org/whl/${package_variant}/" @@ -104,19 +121,52 @@ __extract_pip_arguments () { echo "[INSTALL] Extracted the full PIP package: ${pip_package}" } +__prepare_pip_arguments () { + local package_name_raw="$1" + local package_channel_version="$2" + local package_variant_type_version="$3" + if [ "$package_variant_type_version" == "" ]; then + echo "Usage: ${FUNCNAME[0]} PACKAGE_NAME PACKAGE_CHANNEL[/VERSION] PACKAGE_VARIANT_TYPE[/VARIANT_VERSION]" + return 1 + else + echo "################################################################################" + echo "# Prepare PIP Arguments (PyTorch PIP)" + echo "#" + echo "# [$(date --utc +%FT%T.%3NZ)] + ${FUNCNAME[0]} ${*}" + echo "################################################################################" + echo "" + fi + + # Replace underscores with hyphens to materialize the canonical name of the + # package, and export variable to environment + # shellcheck disable=SC2155 + export package_name=$(echo "${package_name_raw}" | tr '_' '-') + + # Extract the package channel and package version from the tuple-string, and + # export variables to environment + __export_package_channel_info "$package_channel_version" + + # Extract the package variant type and variant version from the tuple-string, + # and export variables to environment + __export_package_variant_info "${package_variant_type_version}" + + # With all package_* variables exported, extract the arguments for PIP, and + # export variabels to environment + __export_pip_arguments +} + install_from_pytorch_pip () { local env_name="$1" local package_name_raw="$2" local package_channel_version="$3" - local package_variant_type="$4" - local package_variant_version="$5" - if [ "$package_variant_type" == "" ]; then - echo "Usage: ${FUNCNAME[0]} ENV_NAME PACKAGE_NAME PACKAGE_CHANNEL_VERSION PACKAGE_VARIANT_TYPE [PACKAGE_VARIANT_VERSION]" + local package_variant_type_version="$4" + if [ "$package_variant_type_version" == "" ]; then + echo "Usage: ${FUNCNAME[0]} ENV_NAME PACKAGE_NAME PACKAGE_CHANNEL[/VERSION] PACKAGE_VARIANT_TYPE[/VARIANT_VERSION]" echo "Example(s):" echo " ${FUNCNAME[0]} build_env torch 1.11.0 cpu # Install the CPU variant, specific version from release channel" echo " ${FUNCNAME[0]} build_env torch release cpu # Install the CPU variant, latest version from release channel" - echo " ${FUNCNAME[0]} build_env fbgemm_gpu test/0.6.0rc0 cuda 12.1.0 # Install the CUDA 12.1 variant, specific version from test channel" - echo " ${FUNCNAME[0]} build_env fbgemm_gpu nightly rocm 5.3 # Install the ROCM 5.3 variant, latest version from nightly channel" + echo " ${FUNCNAME[0]} build_env fbgemm_gpu test/0.6.0rc0 cuda/12.1.0 # Install the CUDA 12.1 variant, specific version from test channel" + echo " ${FUNCNAME[0]} build_env fbgemm_gpu nightly rocm/5.3 # Install the ROCM 5.3 variant, latest version from nightly channel" return 1 else echo "################################################################################" @@ -129,12 +179,12 @@ install_from_pytorch_pip () { test_network_connection || return 1 - __extract_pip_arguments "$env_name" "$package_name_raw" "$package_channel_version" "$package_variant_type" "$package_variant_version" + __prepare_pip_arguments "$package_name_raw" "$package_channel_version" "$package_variant_type_version" # shellcheck disable=SC2155 local env_prefix=$(env_name_or_prefix "${env_name}") - echo "[INSTALL] Attempting to install [${package_name}, ${package_version}+${package_variant}] from PyTorch PIP using channel ${pip_channel} ..." + echo "[INSTALL] Attempting to install [${package_name}, ${package_version:-LATEST}] from PyTorch PIP using channel ${pip_channel} ..." # shellcheck disable=SC2086 (exec_with_retries 3 conda run ${env_prefix} pip install ${pip_package} --extra-index-url ${pip_channel}) || return 1 @@ -144,9 +194,9 @@ install_from_pytorch_pip () { # This test usually applies to the nightly builds # shellcheck disable=SC2086 if conda run ${env_prefix} pip list "${package_name}" | grep "${package_name}" | grep "${package_variant}"; then - echo "[CHECK] The installed package [${package_name}, ${package_version}] is the correct variant (${package_variant})" + echo "[CHECK] The installed package [${package_name}, ${package_channel}/${package_version:-LATEST}] is the correct variant (${package_variant})" else - echo "[CHECK] The installed package [${package_name}, ${package_version}] appears to be an incorrect variant as it is missing references to ${package_variant}!" + echo "[CHECK] The installed package [${package_name}, ${package_channel}/${package_version:-LATEST}] appears to be an incorrect variant as it is missing references to ${package_variant}!" echo "[CHECK] This can happen if the variant of the package (e.g. GPU, nightly) for the MAJOR.MINOR version of CUDA or ROCm presently installed on the system is not available." return 1 fi @@ -161,15 +211,14 @@ download_from_pytorch_pip () { local env_name="$1" local package_name_raw="$2" local package_channel_version="$3" - local package_variant_type="$4" - local package_variant_version="$5" - if [ "$package_variant_type" == "" ]; then - echo "Usage: ${FUNCNAME[0]} ENV_NAME PACKAGE_NAME PACKAGE_CHANNEL_VERSION PACKAGE_VARIANT_TYPE [PACKAGE_VARIANT_VERSION]" + local package_variant_type_version="$4" + if [ "$package_variant_type_version" == "" ]; then + echo "Usage: ${FUNCNAME[0]} ENV_NAME PACKAGE_NAME PACKAGE_CHANNEL[/VERSION] PACKAGE_VARIANT_TYPE[/VARIANT_VERSION]" echo "Example(s):" echo " ${FUNCNAME[0]} build_env torch 1.11.0 cpu # Download the CPU variant, specific version from release channel" echo " ${FUNCNAME[0]} build_env torch release cpu # Download the CPU variant, latest version from release channel" - echo " ${FUNCNAME[0]} build_env fbgemm_gpu test/0.6.0rc0 cuda 12.1.0 # Download the CUDA 12.1 variant, specific version from test channel" - echo " ${FUNCNAME[0]} build_env fbgemm_gpu nightly rocm 5.3 # Download the ROCM 5.3 variant, latest version from nightly channel" + echo " ${FUNCNAME[0]} build_env fbgemm_gpu test/0.6.0rc0 cuda/12.1.0 # Download the CUDA 12.1 variant, specific version from test channel" + echo " ${FUNCNAME[0]} build_env fbgemm_gpu nightly rocm/5.3 # Download the ROCM 5.3 variant, latest version from nightly channel" return 1 else echo "################################################################################" @@ -182,7 +231,7 @@ download_from_pytorch_pip () { test_network_connection || return 1 - __extract_pip_arguments "$env_name" "$package_name_raw" "$package_channel_version" "$package_variant_type" "$package_variant_version" + __prepare_pip_arguments "$package_name_raw" "$package_channel_version" "$package_variant_type_version" # shellcheck disable=SC2155 local env_prefix=$(env_name_or_prefix "${env_name}") @@ -191,7 +240,7 @@ download_from_pytorch_pip () { # shellcheck disable=SC2035 rm -rf *.whl || return 1 - echo "[DOWNLOAD] Attempting to download wheel [${package_name}, ${package_version}+${package_variant}] from PyTorch PIP using channel ${pip_channel} ..." + echo "[DOWNLOAD] Attempting to download wheel [${package_name}, ${package_version:-LATEST}] from PyTorch PIP using channel ${pip_channel} ..." # shellcheck disable=SC2086 (exec_with_retries 3 conda run ${env_prefix} pip download ${pip_package} --extra-index-url ${pip_channel}) || return 1 diff --git a/.github/scripts/utils_pytorch.bash b/.github/scripts/utils_pytorch.bash index a25d78c2d..207a102e5 100644 --- a/.github/scripts/utils_pytorch.bash +++ b/.github/scripts/utils_pytorch.bash @@ -105,16 +105,15 @@ install_pytorch_conda () { install_pytorch_pip () { local env_name="$1" - local pytorch_version="$2" - local pytorch_variant_type="$3" - local pytorch_variant_version="$4" - if [ "$pytorch_variant_type" == "" ]; then - echo "Usage: ${FUNCNAME[0]} ENV_NAME PYTORCH_VERSION PYTORCH_VARIANT_TYPE [PYTORCH_VARIANT_VERSION]" + local pytorch_channel_version="$2" + local pytorch_variant_type_version="$3" + if [ "$pytorch_variant_type_version" == "" ]; then + echo "Usage: ${FUNCNAME[0]} ENV_NAME PYTORCH_CHANNEL[/VERSION] PYTORCH_VARIANT_TYPE[/VARIANT_VERSION]" echo "Example(s):" - echo " ${FUNCNAME[0]} build_env 1.11.0 cpu # Install the CPU variant for a specific version" + echo " ${FUNCNAME[0]} build_env test/2.1.0rc0 cpu # Install the CPU variant for a specific version" echo " ${FUNCNAME[0]} build_env release cpu # Install the CPU variant, latest release version" - echo " ${FUNCNAME[0]} build_env test cuda 12.1.0 # Install the CUDA 12.1 variant, latest test version" - echo " ${FUNCNAME[0]} build_env nightly rocm 5.3 # Install the ROCM 5.3 variant, latest nightly version" + echo " ${FUNCNAME[0]} build_env test cuda/12.1.0 # Install the CUDA 12.1 variant, latest test version" + echo " ${FUNCNAME[0]} build_env nightly rocm/5.3 # Install the ROCM 5.3 variant, latest nightly version" return 1 else echo "################################################################################" @@ -129,7 +128,7 @@ install_pytorch_pip () { local env_prefix=$(env_name_or_prefix "${env_name}") # Install the package from PyTorch PIP (not PyPI) - install_from_pytorch_pip "${env_name}" torch "${pytorch_version}" "${pytorch_variant_type}" "${pytorch_variant_version}" || return 1 + install_from_pytorch_pip "${env_name}" torch "${pytorch_channel_version}" "${pytorch_variant_type_version}" || return 1 # Check that PyTorch is importable (test_python_import_package "${env_name}" torch.distributed) || return 1 diff --git a/.github/workflows/fbgemm_gpu_ci_cuda.yml b/.github/workflows/fbgemm_gpu_ci_cuda.yml index 8eb94da4a..2f7e171d0 100644 --- a/.github/workflows/fbgemm_gpu_ci_cuda.yml +++ b/.github/workflows/fbgemm_gpu_ci_cuda.yml @@ -99,7 +99,7 @@ jobs: # Install via PIP to avoid defaulting to the CPU variant if the GPU variant of the day is not ready - name: Install PyTorch Nightly - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda ${{ matrix.cuda-version }} + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda/${{ matrix.cuda-version }} - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} @@ -178,7 +178,7 @@ jobs: # Install via PIP to avoid defaulting to the CPU variant if the GPU variant of the day is not ready - name: Install PyTorch Nightly - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda ${{ matrix.cuda-version }} + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cuda/${{ matrix.cuda-version }} - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} diff --git a/.github/workflows/fbgemm_gpu_ci_rocm.yml b/.github/workflows/fbgemm_gpu_ci_rocm.yml index ebf9c7f53..6ce786e72 100644 --- a/.github/workflows/fbgemm_gpu_ci_rocm.yml +++ b/.github/workflows/fbgemm_gpu_ci_rocm.yml @@ -103,7 +103,7 @@ jobs: run: . $PRELUDE; install_build_tools $BUILD_ENV - name: Install PyTorch-ROCm Nightly - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly rocm ${{ matrix.rocm-version }} + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly rocm/${{ matrix.rocm-version }} - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} @@ -180,7 +180,7 @@ jobs: run: . $PRELUDE; install_build_tools $BUILD_ENV - name: Install PyTorch-ROCm Nightly - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly rocm ${{ matrix.rocm-version }} + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly rocm/${{ matrix.rocm-version }} - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} diff --git a/.github/workflows/fbgemm_gpu_pip.yml b/.github/workflows/fbgemm_gpu_pip.yml index f1e433cc3..89be4828b 100644 --- a/.github/workflows/fbgemm_gpu_pip.yml +++ b/.github/workflows/fbgemm_gpu_pip.yml @@ -29,10 +29,12 @@ on: description: PyTorch Version (e.g. '2.1.0', 'nightly', 'test') type: string required: true - fbgemm_gpu_version: - description: FBGEMM-GPU Version (e.g. '0.5.0rc1', 'nightly', 'test') + default: "nightly" + fbgemm_gpu_channel_version: + description: FBGEMM-GPU Channel + Version (e.g. '0.5.0', 'nightly', 'test/0.6.0r0') type: string required: true + default: "nightly" fbgemm_gpu_variant_type: description: FBGEMM-GPU Variant type: choice @@ -86,14 +88,14 @@ jobs: run: . $PRELUDE; install_build_tools $BUILD_ENV - name: Install PyTorch-CPU - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_version || 'nightly' }} cpu + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_version }} cpu - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} run: . $PRELUDE; collect_pytorch_env_info $BUILD_ENV - name: Install FBGEMM_GPU-CPU - run: . $PRELUDE; install_fbgemm_gpu_pip $BUILD_ENV ${{ github.event.inputs.fbgemm_gpu_version || 'nightly' }} cpu + run: . $PRELUDE; install_fbgemm_gpu_pip $BUILD_ENV ${{ github.event.inputs.fbgemm_gpu_channel_version }} cpu - name: Test with PyTest timeout-minutes: 10 @@ -118,8 +120,6 @@ jobs: ] python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] cuda-version: [ "11.8.0", "12.1.1" ] - # Specify exactly ONE CUDA version for artifact publish - cuda-version-publish: [ "11.8.0" ] steps: # Cannot upgrade to actions/checkout@v4 yet because GLIBC on the instance is too old @@ -148,14 +148,14 @@ jobs: run: . $PRELUDE; install_cuda $BUILD_ENV ${{ matrix.cuda-version }} - name: Install PyTorch-CUDA - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_version || 'nightly' }} cuda ${{ matrix.cuda-version }} + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_version }} cuda/${{ matrix.cuda-version }} - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} run: . $PRELUDE; collect_pytorch_env_info $BUILD_ENV - name: Install FBGEMM_GPU-CUDA - run: . $PRELUDE; install_fbgemm_gpu_pip $BUILD_ENV ${{ github.event.inputs.fbgemm_gpu_version || 'nightly' }} cuda ${{ matrix.cuda-version }} + run: . $PRELUDE; install_fbgemm_gpu_pip $BUILD_ENV ${{ github.event.inputs.fbgemm_gpu_channel_version }} cuda/${{ matrix.cuda-version }} - name: Test with PyTest timeout-minutes: 15 @@ -214,14 +214,14 @@ jobs: run: . $PRELUDE; install_build_tools $BUILD_ENV - name: Install PyTorch-ROCm - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_version || 'nightly' }} rocm ${{ matrix.rocm-version }} + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_version }} rocm/${{ matrix.rocm-version }} - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} run: . $PRELUDE; collect_pytorch_env_info $BUILD_ENV - name: Install FBGEMM_GPU-ROCm - run: . $PRELUDE; install_fbgemm_gpu_pip $BUILD_ENV ${{ github.event.inputs.fbgemm_gpu_version || 'nightly' }} rocm ${{ matrix.rocm-version }} + run: . $PRELUDE; install_fbgemm_gpu_pip $BUILD_ENV ${{ github.event.inputs.fbgemm_gpu_channel_version }} rocm/${{ matrix.rocm-version }} - name: Test FBGEMM_GPU-ROCm timeout-minutes: 15 diff --git a/.github/workflows/fbgemm_gpu_release_cpu.yml b/.github/workflows/fbgemm_gpu_release_cpu.yml index 213164cc5..2fb9ae28b 100644 --- a/.github/workflows/fbgemm_gpu_release_cpu.yml +++ b/.github/workflows/fbgemm_gpu_release_cpu.yml @@ -24,17 +24,17 @@ on: # workflow_dispatch: inputs: + pytorch_channel: + description: Package Channel to Use for PyTorch Installation + type: choice + required: false + options: [ "nightly", "test", "release" ] + default: "test" publish_to_pypi: description: Publish Artifact to PyPI type: boolean required: false default: false - pytorch_channel: - description: PyTorch Package Channel - type: choice - required: false - options: [ "test", "release" ] - default: "test" concurrency: # Cancel previous runs in the PR if a new commit is pushed @@ -93,7 +93,7 @@ jobs: run: . $PRELUDE; install_build_tools $BUILD_ENV - name: Install PyTorch-CPU Test - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_channel || 'test' }} cpu + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_channel }} cpu - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} @@ -161,7 +161,7 @@ jobs: run: . $PRELUDE; create_conda_environment $BUILD_ENV ${{ matrix.python-version }} - name: Install PyTorch Test - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_channel || 'test' }} cpu + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_channel }} cpu - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} diff --git a/.github/workflows/fbgemm_gpu_release_cuda.yml b/.github/workflows/fbgemm_gpu_release_cuda.yml index 72f42db60..ac2e6b0d6 100644 --- a/.github/workflows/fbgemm_gpu_release_cuda.yml +++ b/.github/workflows/fbgemm_gpu_release_cuda.yml @@ -24,23 +24,23 @@ on: # workflow_dispatch: inputs: - publish_to_pypi: - description: Publish Artifact to PyPI - type: boolean + pytorch_channel: + description: Package Channel to Use for PyTorch Installation + type: choice required: false - default: false + options: [ "nightly", "test", "release" ] + default: "test" cuda_version: - description: CUDA Version to Use for PyPI Publishing + description: CUDA Version to Use for Building Artifact type: choice required: false options: [ "11.8.0", "12.1.1" ] default: "12.1.1" - pytorch_channel: - description: PyTorch Package Channel - type: choice + publish_to_pypi: + description: Publish Artifact to PyPI + type: boolean required: false - options: [ "test", "release" ] - default: "test" + default: false concurrency: # Cancel previous runs in the PR if a new commit is pushed @@ -102,7 +102,7 @@ jobs: run: . $PRELUDE; install_cuda $BUILD_ENV ${{ matrix.cuda-version }} - name: Install PyTorch Test - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_channel || 'test' }} cuda ${{ matrix.cuda-version }} + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_channel }} cuda/${{ matrix.cuda-version }} - name: Collect PyTorch Environment Info if: ${{ success() || failure() }} @@ -174,7 +174,7 @@ jobs: run: . $PRELUDE; install_cuda $BUILD_ENV ${{ matrix.cuda-version }} - name: Install PyTorch Test - run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_channel || 'test' }} cuda ${{ matrix.cuda-version }} + run: . $PRELUDE; install_pytorch_pip $BUILD_ENV ${{ github.event.inputs.pytorch_channel }} cuda/${{ matrix.cuda-version }} - name: Collect PyTorch Environment Info if: ${{ success() || failure() }}