Skip to content

fix: use InfiniRT Hygon runtime headers#791

Merged
voltjia merged 1 commit into
masterfrom
fix/hygon-infinitrt-runtime
Jul 10, 2026
Merged

fix: use InfiniRT Hygon runtime headers#791
voltjia merged 1 commit into
masterfrom
fix/hygon-infinitrt-runtime

Conversation

@voltjia

@voltjia voltjia commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the local Hygon Runtime and DeviceEnabled definitions with the corresponding InfiniRT Hygon headers.
  • Add Hygon data_type_.h and caster.cuh wrappers so InfiniOps keeps its platform caster specialization while data type ownership comes from InfiniRT.
  • Include the Hygon InfiniRT device marker in generated dispatch/call-instantiation sources.

Motivation

Hygon still carried local runtime/device/type definitions after the InfiniRT runtime-header migration, while the other CUDA-like backends consume InfiniRT-owned headers. This keeps Hygon aligned with the current runtime ownership model and prevents generated Hygon dispatch code from missing the InfiniRT Hygon device marker.

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)
  • Hygon (WITH_HYGON)
  • Ascend (WITH_ASCEND)
  • PyTorch C++ bindings (WITH_TORCH)
  • Build system / CMake / CI
  • Python bindings / user-facing API

Smoke Test Result

Hygon smoke was not run locally because this Windows workspace does not have cmake in PATH and does not have a Hygon/DTK device toolchain available. The repository Hygon CI job is the intended affected-platform smoke path for this PR; it builds InfiniRT with WITH_HYGON=ON, installs it, builds InfiniOps with INFINI_OPS_SMOKE_BUILD=ON, then runs pytest tests/ -m smoke.

Local checks run:

> git diff --check
passed

> C:\Users\huang\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe -m py_compile scripts\generate_wrappers.py
passed

> C:\Users\huang\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe -c "import importlib.util; spec=importlib.util.spec_from_file_location('gw','scripts/generate_wrappers.py'); m=importlib.util.module_from_spec(spec); spec.loader.exec_module(m); assert 'infini/rt/hygon/device_.h' in m._device_marker_headers(['hygon']); print('hygon marker ok')"
hygon marker ok

> rg -n "struct Runtime<Device::Type::kHygon>|struct DeviceEnabled<Device::Type::kHygon>|struct TypeMap<Device::Type::kHygon" -S src\native\cuda\hygon scripts\generate_wrappers.py
no matches

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
NVIDIA No N/A - not affected N/A
Iluvatar No N/A - not affected N/A
MetaX No N/A - not affected N/A
Cambricon No N/A - not affected N/A
Moore No N/A - not affected N/A
Hygon Yes Not run locally - requires Hygon/DTK runner Hygon CI smoke expected
Ascend No N/A - not affected N/A
Full `pytest` output (optional)
N/A - not run locally; no Hygon/DTK environment in this workspace.

Benchmark / Performance Impact

N/A - this changes header ownership and generated include coverage only.

Notes for Reviewers

Please focus on the Hygon include chain: runtime_.h now consumes <infini/rt/hygon/runtime_.h> and keeps the InfiniOps-owned Caster<Device::Type::kHygon> specialization in native/cuda/hygon/caster.cuh so existing CUDA-like kernels still see the caster specialization.

@voltjia
voltjia requested a review from a team July 9, 2026 06:49
@voltjia
voltjia force-pushed the fix/hygon-infinitrt-runtime branch from fd6462d to dd2e634 Compare July 10, 2026 05:41
@voltjia
voltjia force-pushed the fix/hygon-infinitrt-runtime branch from 7d0bfe6 to 4ab7218 Compare July 10, 2026 06:56
@voltjia
voltjia merged commit d5cd9cd into master Jul 10, 2026
15 of 18 checks passed
@voltjia
voltjia deleted the fix/hygon-infinitrt-runtime branch July 10, 2026 07:04
Sign up for free to 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