diff --git a/python/foundry/__init__.py b/python/foundry/__init__.py index bb88e00e..2002abf5 100644 --- a/python/foundry/__init__.py +++ b/python/foundry/__init__.py @@ -9,12 +9,13 @@ resume_allocation_region, set_current_alloc_offset, ) + +from .ops import * # isort: skip from .graph import ( CUDAGraph, graph, save_graph_manifest, ) -from .ops import * # Re-exports. Listed here so ruff's --fix doesn't strip them as unused. # (We also configure per-file-ignores for F401 in pyproject.toml as a backstop.) diff --git a/tests/test_imports.py b/tests/test_imports.py index 2de75a6e..9e1c055a 100644 --- a/tests/test_imports.py +++ b/tests/test_imports.py @@ -69,6 +69,13 @@ def test_re_exports_present(): ) +def test_cudagraph_reexport_uses_python_wrapper(): + foundry = importlib.import_module("foundry") + graph_module = importlib.import_module("foundry.graph") + + assert foundry.CUDAGraph is graph_module.CUDAGraph + + def test_vllm_integration_public_api(): mod = importlib.import_module("foundry.integration.vllm") for name in ("install_hooks", "CUDAGraphExtensionMode", "get_graph_extension_mode"):