Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed tests for cpu only platforms #1259

Conversation

galqiwi
Copy link
Contributor

@galqiwi galqiwi commented Jun 26, 2024

test_4bit_warnings is the only test that fails on cpu only platforms with CUDA-enabled torch.

The reason for this is that other tests fall into this branch

except RuntimeError as re:
    # CUDA-enabled Torch build, but no CUDA-capable device found
    if "Found no NVIDIA driver on your system" in str(re):
        pytest.skip("No NVIDIA driver found")
    raise

While test_4bit_warnings fails with Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emitted, as the error is catched by pytest.warns.

@galqiwi galqiwi changed the title Fixed test_4bit_warnings on cpu only platforms Fixed tests for cpu only platforms Jun 26, 2024
@galqiwi
Copy link
Contributor Author

galqiwi commented Jun 26, 2024

Sorry, overlooked 3 tests that fail during setup in linear8bit fixture.

Now pytest ./tests truly works

Results (295.12s (0:04:55)):
      54 passed
    3209 skipped

@Titus-von-Koeller
Copy link
Collaborator

Thank you so much @galqiwi, really appreciated! It's always good to have folks with a hands-on attitude and spot-on :)

Sorry for the delay, unfortunately was out sick, etc..

@Titus-von-Koeller Titus-von-Koeller merged commit 39b42e7 into bitsandbytes-foundation:main Jul 15, 2024
6 of 19 checks passed
@galqiwi galqiwi deleted the test_4bit_warnings_cpu_fix branch July 15, 2024 18:06
matthewdouglas pushed a commit to matthewdouglas/bitsandbytes that referenced this pull request Oct 28, 2024
* fixed test_4bit_warnings on cpu-only platforms

* fixed linear8bit-based tests for cpu only platforms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants