Skip to content

Commit

Permalink
build: Ninja as a dependency in JIT mode (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
ur4t authored Dec 13, 2024
1 parent ed89d24 commit 16549dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions custom_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@


def _get_requires_for_build():
return (
["torch", "ninja"]
if os.environ.get("FLASHINFER_ENABLE_AOT", "0") == "1"
else ["ninja"]
)
requires = []
if os.environ.get("FLASHINFER_ENABLE_AOT", "0") == "1":
requires += ["torch", "ninja"]
return requires


def get_requires_for_build_wheel(config_settings=None):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def generate_cuda() -> None:

ext_modules = []
cmdclass = {}
install_requires = ["torch"]
install_requires = ["torch", "ninja"]
generate_build_meta({})
generate_cuda()

Expand Down

0 comments on commit 16549dc

Please sign in to comment.