Skip to content

Commit

Permalink
Fix error from 4830.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Jan 8, 2025
1 parent 53e37c9 commit 1123cf2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ci/notebook_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ def skip_book_dir(runtype):
return runtype in runtype_dict and Path(runtype_dict.get(runtype)).is_file()


def _get_cuda_version_string():
status, version = runtime.getLocalRuntimeVersion()
if status != runtime.cudaError_t.cudaSuccess:
raise RuntimeError("Could not get CUDA runtime version.")
major, minor = divmod(version, 1000)
minor //= 10
return f"{major}.{minor}"

cuda_version_string = _get_cuda_version_string()

parser = argparse.ArgumentParser(description="Condition for running the notebook tests")
parser.add_argument("runtype", type=str)

Expand Down

0 comments on commit 1123cf2

Please sign in to comment.