Skip to content

Commit 457dc08

Browse files
committed
Disable runtime error before final validation
1 parent 8c44fbc commit 457dc08

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/validate-linux-binaries.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ jobs:
5555
export ENV_NAME="conda-env-${{ github.run_id }}"
5656
export TARGET_OS="linux"
5757
eval "$(conda shell.bash hook)"
58-
source ./.github/scripts/validate_binaries.sh
5958
6059
# Special case PyPi installation package. And Install of PyPi package via poetry
6160
if [[ ${MATRIX_PACKAGE_TYPE} == "manywheel" ]] && \
6261
([[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" && ${MATRIX_CHANNEL} != "release" ]] || \
6362
[[ ${MATRIX_GPU_ARCH_VERSION} == "11.7" && ${MATRIX_CHANNEL} == "release" ]]); then
64-
source ./.github/scripts/validate_pipy.sh
65-
source ./.github/scripts/validate_poetry.sh
63+
source ./.github/scripts/validate_pipy.sh --runtime-error-check disabled
64+
source ./.github/scripts/validate_poetry.sh --runtime-error-check disabled
6665
fi
66+
67+
# Standart case: Validate binaries
68+
source ./.github/scripts/validate_binaries.sh

test/smoke_test/smoke_test.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_cuda_runtime_errors_captured() -> None:
102102
if(cuda_exception_missed):
103103
raise RuntimeError( f"Expected CUDA RuntimeError but have not received!")
104104

105-
def smoke_test_cuda(package: str) -> None:
105+
def smoke_test_cuda(package: str, runtime_error_check: str) -> None:
106106
if not torch.cuda.is_available() and is_cuda_system:
107107
raise RuntimeError(f"Expected CUDA {gpu_arch_ver}. However CUDA is not loaded.")
108108

@@ -132,7 +132,8 @@ def smoke_test_cuda(package: str) -> None:
132132
if (sys.platform == "linux" or sys.platform == "linux2") and sys.version_info < (3, 11, 0):
133133
smoke_test_compile()
134134

135-
test_cuda_runtime_errors_captured()
135+
if(runtime_error_check == "enabled")
136+
test_cuda_runtime_errors_captured()
136137

137138

138139
def smoke_test_conv2d() -> None:
@@ -231,6 +232,13 @@ def main() -> None:
231232
choices=["all", "torchonly"],
232233
default="all",
233234
)
235+
parser.add_argument(
236+
"--runtime-error-check",
237+
help="No Runtime Error check",
238+
type=str,
239+
choices=["enabled", "disabled"],
240+
default="enabled",
241+
)
234242
options = parser.parse_args()
235243
print(f"torch: {torch.__version__}")
236244
check_version(options.package)
@@ -240,7 +248,7 @@ def main() -> None:
240248
if options.package == "all":
241249
smoke_test_modules()
242250

243-
smoke_test_cuda(options.package)
251+
smoke_test_cuda(options.package, options.runtime_error_check)
244252

245253

246254
if __name__ == "__main__":

0 commit comments

Comments
 (0)