Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7d58db3
build: add PyYAML build dependency
voltjia May 9, 2026
15da799
refactor(swiglu): move `Sigmoid` helper to `detail::`
voltjia May 9, 2026
a5e9ce2
feat(operator): graceful handling of unknown device types
voltjia May 9, 2026
c0c35ff
feat: add YAML-driven torch op codegen
voltjia May 9, 2026
60a2696
build: integrate torch op codegen into CMake
voltjia May 9, 2026
023c414
feat(scripts): generate pybind bindings for generated torch ops
voltjia May 9, 2026
df18dc1
fix(scripts): order pybind overloads from specific to permissive
voltjia May 9, 2026
b868821
test: add data-driven coverage for generated torch ops
voltjia May 9, 2026
527b3e4
feat(scripts): drop overload-name suffix from generated class names
voltjia May 9, 2026
786b90d
feat(scripts): store visible non-tensor params as base members
voltjia May 9, 2026
d918f21
feat(scripts): expose default-valued non-optional params
voltjia May 9, 2026
156e83f
fix(scripts): preserve `std::vector<int64_t>` params in pybind genera…
voltjia May 9, 2026
ea64161
fix(scripts): gate generated-base scan on `--with-torch`
voltjia May 9, 2026
832e048
fix(scripts): rename ATen `self` parameter to `input`
voltjia May 9, 2026
78424f7
perf(scripts): gate torch op instantiations by active device
voltjia May 9, 2026
8bd1b87
chore(scripts): drop `AUTO-GENERATED` header from emitted files
voltjia May 9, 2026
fdfb295
fix(scripts): pipe generated headers through clang-format
voltjia May 9, 2026
800619d
style(scripts): apply `ruff format` from latest
voltjia May 9, 2026
cfea02e
build: throttle torch source compilation via Ninja job pool
voltjia May 9, 2026
dc2991c
build: add `clang-format` to build-system requires
voltjia May 9, 2026
0f00407
fix(scripts): pip-install `clang-format` if missing at codegen time
voltjia May 9, 2026
c739b19
fix(scripts): make `clang-format` optional at codegen time
voltjia May 9, 2026
ea3888b
fix(build): break cyclic dep between `infiniops` and torch object lib
voltjia May 9, 2026
49c3a25
build: skip PyTorch auto-detection on Cambricon
voltjia May 9, 2026
e734ded
test: skip overloads that the harness cannot drive cleanly
voltjia May 9, 2026
bb86ccd
test: resolve dtype attributes lazily for older torch forks
voltjia May 9, 2026
a2f1bf5
style(tests): apply ruff format
voltjia May 9, 2026
8c9c384
test: skip `mode` op (`torch_musa` kernel hangs on MUSA)
voltjia May 9, 2026
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
19 changes: 17 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,23 @@ if(AUTO_DETECT_BACKENDS)
)

if(_torch_import_result EQUAL 0)
set(WITH_TORCH ON)
message(STATUS "Auto-detected PyTorch.")
# Cambricon's `torch_mlu` fork is pinned to an older ATen
# release whose `<op>_out` overloads do not match the
# `pytorch v2.4.0` schema we generate against (e.g.
# `all.dims_out` takes `int64_t dim`/`Dimname dim` instead of
# the `OptionalIntArrayRef dim` we emit). Skip the auto-
# detection on cambricon so the generated torch backends do
# not poison the build. Pass `-DWITH_TORCH=ON` explicitly to
# opt back in.
if(WITH_CAMBRICON)
message(STATUS
"Skipping PyTorch auto-detection on Cambricon "
"(`torch_mlu` ATen overloads incompatible with the "
"codegen's v2.4.0 schema).")
else()
set(WITH_TORCH ON)
message(STATUS "Auto-detected PyTorch.")
endif()
endif()
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["scikit-build-core", "pybind11", "libclang"]
requires = ["scikit-build-core", "pybind11", "libclang", "pyyaml", "clang-format"]
build-backend = "scikit_build_core.build"

[project]
Expand Down
Loading
Loading