Skip to content

feat(ascend): add fill provider - #971

Merged
voltjia merged 1 commit into
masterfrom
feat/ascend-fill-kernel
Sep 4, 2026
Merged

feat(ascend): add fill provider#971
voltjia merged 1 commit into
masterfrom
feat/ascend-fill-kernel

Conversation

@baominghelly

@baominghelly baominghelly commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add the Ascend fill provider in src/native/ascend/ops/fill/kernel.h using the ACLNN in-place scalar and tensor fill APIs.
  • Add Ascend device-scalar coverage to tests/test_fill.py while preserving the existing host-scalar cases.

Motivation

The generated fill interface did not have an Ascend slot-0 provider. This change enables both host scalar values and one-element device tensor values for model execution on Ascend.

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

bash /workspace/ascend-slot0/configure-focused-build.sh \
  /workspace/ascend-slot0/fill \
  /workspace/ascend-slot0/build-fill \
  /workspace/ascend-slot0/test-config/ops-fill.json
cmake --build /workspace/ascend-slot0/build-fill --parallel 32
bash /workspace/ascend-slot0/basic-ops-20260901/scripts/run-focused-test.sh \
  /workspace/ascend-slot0/fill \
  /workspace/ascend-slot0/build-fill \
  /workspace/ascend-slot0/python-fill \
  tests/test_fill.py

[100%] Built target ops
64 passed, 6 skipped, 15 warnings in 1.27s

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
NVIDIA No N/A - not affected N/A - not affected
Iluvatar No N/A - not affected N/A - not affected
MetaX No N/A - not affected N/A - not affected
Cambricon No N/A - not affected N/A - not affected
Moore No N/A - not affected N/A - not affected
Ascend Yes Focused build passed on Ascend 910C with CANN 9.0.0 Complete tests/test_fill.py: 64 passed, 6 skipped
Full `pytest` output (optional)
collected 70 items
64 passed, 6 skipped, 15 warnings in 1.27s

Benchmark / Performance Impact

N/A. This PR adds functional provider coverage and does not claim a performance improvement.

Notes for Reviewers

  • The scalar overload keeps the backing double as an operator member because aclCreateScalar retains its address.
  • The tensor-value overload requires a one-element tensor on the same Ascend device as the output.
  • Validation used the focused operator build and complete fill test file; the repository-wide test suite was not run.

@baominghelly
baominghelly force-pushed the feat/ascend-fill-kernel branch from 6fd8f76 to 7c07b4d Compare September 3, 2026 03:23
@baominghelly
baominghelly marked this pull request as ready for review September 3, 2026 06:34
@baominghelly
baominghelly requested a review from a team September 3, 2026 06:34
@voltjia voltjia changed the title feat(ascend): add fill provider feat(ascend): add fill provider Sep 4, 2026
@voltjia
voltjia merged commit 2e8a704 into master Sep 4, 2026
13 of 20 checks passed
@voltjia
voltjia deleted the feat/ascend-fill-kernel branch September 4, 2026 02:43
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.

2 participants