refactor: move compiled kernel .so files into extension/lib

- CUDAExtension module names changed from astrai.extension.<name> to astrai.extension.lib.<name>
- Compiled .so files now land in astrai/extension/lib/ instead of alongside Python source
- loader.py imports from .lib.<name> subpackage
- Add astrai/extension/lib/__init__.py to make lib a proper package
- Separates compiled artifacts from Python source for cleaner directory structure
This commit is contained in:
2026-07-31 15:36:32 +08:00
parent 3e67b4f88d
commit 9f83d982ec
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ from setuptools import setup
from setuptools.command.build_ext import build_ext as _build_ext
sys.path.insert(0, str(Path(__file__).parent))
os.makedirs("astrai/extension", exist_ok=True)
os.makedirs("astrai/extension/lib", exist_ok=True)
def _should_build():
@@ -57,7 +57,7 @@ if _should_build():
for name, info in REGISTRY.items():
ext_modules.append(
CUDAExtension(
f"astrai.extension.{name}",
f"astrai.extension.lib.{name}",
info["sources"],
extra_compile_args={
"cxx": info["cxx_flags"],