Skip to content

Commit

Permalink
Merge branch 'pytorch:main' into xu_switch_to_mkl_static
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhancn authored Jul 9, 2024
2 parents 943437e + 987dcb0 commit 2e50539
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 22 deletions.
5 changes: 5 additions & 0 deletions .github/scripts/validate_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ else
export PATH=${OLD_PATH}
fi

# Use case CUDA_VISIBLE_DEVICES: https://github.com/pytorch/pytorch/issues/128819
if [[ ${MATRIX_GPU_ARCH_TYPE} == 'cuda' ]]; then
python3 -c "import torch;import os;print(torch.cuda.device_count(), torch.__version__);os.environ['CUDA_VISIBLE_DEVICES']='0';print(torch.empty(2, device='cuda'))"
fi

# this is optional step
if [[ ${TARGET_OS} != linux* ]]; then
conda deactivate
Expand Down
2 changes: 1 addition & 1 deletion check_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ if [[ "$OSTYPE" == "msys" ]]; then
fi

# Test that CUDA builds are setup correctly
if [[ "$DESIRED_CUDA" != 'cpu' && "$DESIRED_CUDA" != 'cpu-cxx11-abi' && "$DESIRED_CUDA" != *"rocm"* && "$(uname -m)" != "s390x" ]]; then
if [[ "$DESIRED_CUDA" != 'cpu' && "$DESIRED_CUDA" != 'xpu' && "$DESIRED_CUDA" != 'cpu-cxx11-abi' && "$DESIRED_CUDA" != *"rocm"* && "$(uname -m)" != "s390x" ]]; then
if [[ "$PACKAGE_TYPE" == 'libtorch' ]]; then
build_and_run_example_cpp check-torch-cuda
else
Expand Down
2 changes: 1 addition & 1 deletion common/install_mkl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -ex

# MKL
MKL_VERSION=2022.2.1
MKL_VERSION=2024.2.0

mkdir -p /opt/intel/
pushd /tmp
Expand Down
13 changes: 0 additions & 13 deletions manywheel/build_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -437,19 +437,6 @@ for pkg in /$WHEELHOUSE_DIR/torch_no_python*.whl /$WHEELHOUSE_DIR/torch*linux*.w
popd
fi

if [[ "$USE_SPLIT_BUILD" == "true" ]]; then
# @sahanp todo: Remove this line
echo "current files in directory"
ls -l

echo "removing extraneous .so and .a files"
# todo @PaliC: Remove these .so and .a files before hand in the split build
rm *.so *.a || true

echo "Packaging the following files"
ls -alR
fi

# zip up the wheel back
zip -rq $(basename $pkg) $PREIX*

Expand Down
8 changes: 1 addition & 7 deletions test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,6 @@ def smoke_test_cuda(package: str, runtime_error_check: str, torch_compile_check:
if (sys.platform in ["linux", "linux2"]):
print(f"torch nccl version: {torch.cuda.nccl.version()}")


# test settind CUDA_VISIBLE_DEVICES
print(f"torch.cuda.device_count: {torch.cuda.device_count()}")
os.environ['CUDA_VISIBLE_DEVICES']='0'
print(torch.empty(2, device='cuda'))
del os.environ['CUDA_VISIBLE_DEVICES']

if runtime_error_check == "enabled":
test_cuda_runtime_errors_captured()

Expand Down Expand Up @@ -323,6 +316,7 @@ def main() -> None:
)
options = parser.parse_args()
print(f"torch: {torch.__version__}")
print(torch.__config__.parallel_info())

check_version(options.package)
smoke_test_conv2d()
Expand Down

0 comments on commit 2e50539

Please sign in to comment.