Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/user_guide/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Run the test suite with `python tests/run_tests.py`. CLI arguments are forwarded to pytest. For example, to run only Metal tests matching a keyword:

```
python tests/run_tests.py --arch metal -k "test_tile16_cholesky"
python tests/run_tests.py --arch metal -k "test_cholesky"
```

The target architecture can also be set via the `QD_WANTED_ARCHS` environment variable (comma-separated, e.g. `QD_WANTED_ARCHS=metal,vulkan`).
Expand Down
6 changes: 3 additions & 3 deletions docs/source/user_guide/unit_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Common one-liners:

```
# run one file
python tests/run_tests.py test_tile16
python tests/run_tests.py test_tile

# run one test (any pytest -k expression)
python tests/run_tests.py -k test_tile16_cholesky
python tests/run_tests.py -k test_cholesky

# run on a specific backend (or comma-separated list)
python tests/run_tests.py --arch cuda
python tests/run_tests.py --arch metal -k tile16
python tests/run_tests.py --arch metal -k tile

# same, via env var (handy for CI)
QD_WANTED_ARCHS=metal,vulkan python tests/run_tests.py
Expand Down
2 changes: 1 addition & 1 deletion python/quadrants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __getattr__(attr):
if attr == "cfg":
return None if lang.impl.get_runtime()._prog is None else lang.impl.current_cfg()
if attr == "outer":
from quadrants.lang.simt._tile16 import outer # noqa: I001 # pylint: disable=import-outside-toplevel
from quadrants.lang.simt._tile import outer # noqa: I001 # pylint: disable=import-outside-toplevel

return outer
raise AttributeError(f"module '{__name__}' has no attribute '{attr}'")
Expand Down
19 changes: 7 additions & 12 deletions python/quadrants/lang/simt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,20 @@
from quadrants.lang.simt import block, grid, subgroup, warp

if TYPE_CHECKING:
from quadrants.lang.simt._tile16 import Tile16x16Proxy as Tile16x16
from quadrants.lang.simt._tile32 import Tile32x32Proxy as Tile32x32
from quadrants.lang.simt._tile import Tile16x16Proxy as Tile16x16
from quadrants.lang.simt._tile import Tile32x32Proxy as Tile32x32

__all__ = ["warp", "subgroup", "block", "grid", "Tile16x16", "Tile32x32"]


def __getattr__(name):
if name == "Tile16x16":
from quadrants.lang.simt._tile16 import ( # pylint: disable=import-outside-toplevel
if name in ("Tile16x16", "Tile32x32"):
from quadrants.lang.simt._tile import ( # pylint: disable=import-outside-toplevel
Tile16x16Proxy,
)

globals()["Tile16x16"] = Tile16x16Proxy
return Tile16x16Proxy
if name == "Tile32x32":
from quadrants.lang.simt._tile32 import ( # pylint: disable=import-outside-toplevel
Tile32x32Proxy,
)

globals()["Tile32x32"] = Tile32x32Proxy
return Tile32x32Proxy
proxy = Tile16x16Proxy if name == "Tile16x16" else Tile32x32Proxy
globals()[name] = proxy
return proxy
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
Loading
Loading