Skip to content

fix: remove unused device placeholders - #790

Merged
voltjia merged 1 commit into
masterfrom
fix/remove-unused-device-placeholders
Jul 10, 2026
Merged

fix: remove unused device placeholders#790
voltjia merged 1 commit into
masterfrom
fix/remove-unused-device-placeholders

Conversation

@voltjia

Copy link
Copy Markdown
Collaborator

Summary

  • Remove unsupported kKunlun and kQy device placeholders from src/device.h, Python device parsing, Torch device naming, and Torch explicit instantiations.
  • Remove Kunlun / Qy entries from wrapper and Torch codegen device lists.
  • Update the ATen operator backend example so it only lists currently wired device types.

Motivation

InfiniRT is removing the unused kKunlun and kQy placeholders in InfiniTensor/InfiniRT#24. InfiniOps aliases infini::rt::Device, so keeping these enum references would break builds once InfiniOps is built against that InfiniRT branch.

Closes N/A

Type of Change

  • feat - new feature / new operator / new platform
  • fix - bug fix
  • perf - performance improvement (no behavioral change)
  • refactor - code restructuring without behavior change
  • test - adding or fixing tests only
  • docs - documentation only
  • build / ci - build system or CI configuration
  • chore - tooling, formatting, or other non-code changes
  • Breaking change (requires a ! in the Conventional Commits prefix or a BREAKING CHANGE: footer)

Platforms Affected

  • CPU (WITH_CPU)
  • NVIDIA (WITH_NVIDIA)
  • Iluvatar (WITH_ILUVATAR)
  • MetaX (WITH_METAX)
  • Cambricon (WITH_CAMBRICON)
  • Moore (WITH_MOORE)
  • Ascend (WITH_ASCEND)
  • PyTorch C++ bindings (WITH_TORCH)
  • Build system / CMake / CI
  • Python bindings / user-facing API

Smoke Test Result

# Static checks on Windows checkout
rg -n "kKunlun|kQy|kunlun|qy|INFINI_DEVICE_KUNLUN|INFINI_DEVICE_QY" .
# no matches
git diff --check
# passed
python -m py_compile scripts/generate_wrappers.py scripts/generate_torch_ops.py
# passed
# Combined branch verification on remote nvidia host, using:
# - InfiniRT branch: fix/remove-unused-device-types (InfiniTensor/InfiniRT#24)
# - InfiniOps branch: fix/remove-unused-device-placeholders
# - container: accelerator-dev/nvidia:latest
cmake -S InfiniRT -B InfiniRT/build \
-DCMAKE_INSTALL_PREFIX=/workspace/infinirt-prefix \
-DWITH_CPU=ON \
-DWITH_NVIDIA=ON \
-DINFINI_RT_BUILD_TESTING=ON
cmake --build InfiniRT/build -j"$(nproc)"
ctest --test-dir InfiniRT/build --output-on-failure
cmake --install InfiniRT/build
python3 -m pip install . --no-build-isolation --no-deps \
--config-settings=cmake.define.INFINI_RT_ROOT=/workspace/infinirt-prefix \
--config-settings=cmake.define.WITH_CPU=ON \
--config-settings=cmake.define.WITH_NVIDIA=ON \
--config-settings=cmake.define.INFINI_OPS_SMOKE_BUILD=ON
python3 -m pytest tests -m smoke -q --devices cpu nvidia
InfiniRT CTest: 100% tests passed, 0 tests failed out of 8
InfiniOps smoke: 71 passed, 14 skipped, 12211 deselected in 17.50s

Test Results on Supported Platforms

PlatformAffectedBuild / Smoke ResultFull Result / Notes
NVIDIAYessmoke passed with InfiniRT PR #24 branchFull not run
IluvatarNoN/A - not affectedNot run
MetaXNoN/A - not affectedNot run
CambriconNoN/A - not affectedNot run
MooreNoN/A - not affectedNot run
AscendNoN/A - not affectedNot run
Full `pytest` output (optional)
Running 85 items in this shard
..............ss..ss....ss...................................ssssss..ss. [ 84%]
............. [100%]
71 passed, 14 skipped, 12211 deselected in 17.50s

Benchmark / Performance Impact

N/A - this removes unused device placeholders and does not change kernels or algorithms.

Notes for Reviewers

This PR is intended to be merged with or after InfiniTensor/InfiniRT#24. The validation above builds InfiniOps against that InfiniRT branch to cover the cross-repo compatibility boundary.

@voltjia
voltjia requested a review from a teamJuly 9, 2026 06:24
@voltjia
voltjia merged commit 902abc2 into masterJul 10, 2026
39 of 55 checks passed
@voltjia
voltjia deleted the fix/remove-unused-device-placeholders branch July 10, 2026 03:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@voltjia