Skip to content

Commit

Permalink
Fix post-script on Nova (#2233)
Browse files Browse the repository at this point in the history
Summary:
Post-script on Nova was not updated to match recent changes to OSS build and test scripts, and testings were not executed. This diff allows the testings to be run correctly.


Differential Revision: D52377515
  • Loading branch information
spcyppt authored and facebook-github-bot committed Dec 21, 2023
1 parent 2f5e16e commit a364515
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/scripts/nova_postscript.bash
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,22 @@ install_fbgemm_gpu_wheel "${BUILD_ENV_NAME}" fbgemm_gpu/dist/*.whl

# Test with PyTest
echo "[NOVA] Current working directory: $(pwd)"
CPU_GPU="${CU_VERSION}"
if [ "${CU_VERSION}" != 'cpu' ]; then
CPU_GPU=""
if [[ $CU_VERSION = cu* ]]; then
echo "[NOVA] Testing the CUDA variant of FBGEMM_GPU ..."
export fbgemm_variant="cuda"

elif [[ $CU_VERSION = rocm* ]]; then
echo "[NOVA] Testing the ROCm variant of FBGEMM_GPU ..."
export fbgemm_variant="rocm"

else
echo "[NOVA] Testing the CPU variant of FBGEMM_GPU ..."
export fbgemm_variant="cpu"
fi

$CONDA_RUN python3 -c "import torch; print('cuda.is_available() ', torch.cuda.is_available()); print ('device_count() ',torch.cuda.device_count());"
cd "${FBGEMM_REPO}/fbgemm_gpu/test" || { echo "[NOVA] Failed to cd to fbgemm_gpu/test from $(pwd)"; };
run_fbgemm_gpu_tests "${BUILD_ENV_NAME}" "${CPU_GPU}"
run_fbgemm_gpu_tests "${BUILD_ENV_NAME}" "${fbgemm_variant}"

# Workaround EACCES: permission denied error at checkout step
chown -R 1000:1000 /__w/FBGEMM/FBGEMM/ || echo "Unable to chown 1000:1000 from $USER, uid: $(id -u)"

0 comments on commit a364515

Please sign in to comment.