diff options
author | Tim Dettmers <tim.dettmers@gmail.com> | 2022-10-25 08:01:19 -0700 |
---|---|---|
committer | Tim Dettmers <tim.dettmers@gmail.com> | 2022-10-25 08:01:19 -0700 |
commit | a371be302ddbdf3f36acef1a6fe365672099c9d9 (patch) | |
tree | e86da0916db9bf6184ce4cc06ebd9ebfeb2762a2 /tests | |
parent | 62e1649357095473fe6055c6f6b03743d1753e11 (diff) |
Added CUDA SETUP instruction generator.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cuda_setup_evaluator.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/test_cuda_setup_evaluator.py b/tests/test_cuda_setup_evaluator.py index 6fbd29f..bf9a003 100644 --- a/tests/test_cuda_setup_evaluator.py +++ b/tests/test_cuda_setup_evaluator.py @@ -93,12 +93,8 @@ def test_full_system(): # but it does not contain the library directly, so we need to look at the a sub-folder version = "" if "CONDA_PREFIX" in os.environ: - ls_output, err = bnb.utils.execute_and_return( - f'ls -l {os.environ["CONDA_PREFIX"]}/lib/libcudart.so' - ) - major, minor, revision = ( - ls_output.split(" ")[-1].replace("libcudart.so.", "").split(".") - ) + ls_output, err = bnb.utils.execute_and_return(f'ls -l {os.environ["CONDA_PREFIX"]}/lib/libcudart.so') + major, minor, revision = (ls_output.split(" ")[-1].replace("libcudart.so.", "").split(".")) version = float(f"{major}.{minor}") if version == "" and "LD_LIBRARY_PATH" in os.environ: @@ -114,6 +110,6 @@ def test_full_system(): assert version > 0 - binary_name = evaluate_cuda_setup() + binary_name, cudart_path, cuda, cc, cuda_version_string = evaluate_cuda_setup() binary_name = binary_name.replace("libbitsandbytes_cuda", "") assert binary_name.startswith(str(version).replace(".", "")) |