Skip to content

feat(cambricon): integrate InfiniOps backend - #1522

Open
baominghelly wants to merge 2 commits into
mainfrom
feat/cambricon-infiniops
Open

feat(cambricon): integrate InfiniOps backend#1522
baominghelly wants to merge 2 commits into
mainfrom
feat/cambricon-infiniops

Conversation

@baominghelly

Copy link
Copy Markdown
Contributor

Summary

  • enable the InfiniOps runtime, context, and dispatcher for Cambricon
  • initialize RoPE cache tensors for the Cambricon InfiniOps path and register the rotary embedding adapter
  • use InfiniOps Argmax for Cambricon greedy sampling and synchronize Cambricon D2H copies before host reads
  • extend the InfiniOps external build for Cambricon, including the selected INFINI_OPS_OPS adapters, PyTorch/torch_mlu ABI and link settings, and a single dispatch translation unit

Verification

Tested in infinicore-cambricon-dev-libaoming with:

export INFINI_OPS_OPS=add,argmax,copy,embedding,fused_add_rms_norm,gemm,rms_norm,rotary_embedding,silu_and_mul
xmake build
xmake install
xmake build _infinicore
xmake install _infinicore

The complete build/install chain exited successfully. Both imports below succeeded with the generated extension:

python3.10 -c "import infinicore; print(infinicore.__file__)"
python3.10 -c "import torch; import torch_mlu; import infinicore; from infinicore.lib import _infinicore; print(_infinicore.__file__)"

Related InfiniOps operator PRs:

@baominghelly
baominghelly force-pushed the feat/cambricon-infiniops branch 2 times, most recently from bf18b87 to a4337b4 Compare August 24, 2026 04:48
@baominghelly
baominghelly marked this pull request as ready for review August 24, 2026 06:03
@baominghelly
baominghelly requested review from a team and voltjia August 24, 2026 06:03

@wooway777 wooway777 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conflict了,另外xmake.lua额外需要这么多修改的理由是什么?有些东西是不是应该收束到bang.lua里面

@baominghelly
baominghelly force-pushed the feat/cambricon-infiniops branch from a4337b4 to 38af5fe Compare August 24, 2026 07:44
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.

3 participants