We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 264bdc4 commit f1da794Copy full SHA for f1da794
1 file changed
tests/test_marlin_import_min.py
@@ -0,0 +1,18 @@
1
+import pytest
2
+import torch
3
+
4
+from gptqmodel import extension
5
+from gptqmodel.nn_modules.qlinear import marlin as marlin_mod
6
7
8
+def test_marlin_runtime_chain_test():
9
+ """
10
+ extension.load -> marlin_runtime_available -> (if error: marlin_runtime_error)
11
12
13
+ loaded = extension.load(name="marlin_fp16", use_cache=True)
14
+ assert loaded.get("marlin_fp16") is True
15
16
+ ok = marlin_mod.marlin_runtime_available(torch.float16)
17
+ if not ok:
18
+ pytest.fail("Marlin torch.ops kernels are not properly installed. Error: " + marlin_mod.marlin_runtime_error(torch.float16))
0 commit comments