mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
15 lines
488 B
Python
15 lines
488 B
Python
import sys
|
|
|
|
import triton
|
|
|
|
|
|
def test_is_lazy():
|
|
from importlib import reload
|
|
reload(sys.modules["triton.runtime.driver"])
|
|
reload(sys.modules["triton.runtime"])
|
|
mod = sys.modules[triton.runtime.driver.__module__]
|
|
assert isinstance(triton.runtime.driver, getattr(mod, "LazyProxy"))
|
|
assert triton.runtime.driver._obj is None
|
|
utils = triton.runtime.driver.utils # noqa: F841
|
|
assert issubclass(triton.runtime.driver._obj.__class__, getattr(mod, "DriverBase"))
|