Skip to content

refactor(ops): use InfiniOps Copy for rearrange - #1478

Closed
voltjia wants to merge 1 commit into
refactor/migrate-infiniops-softmax-wrapperfrom
refactor/migrate-infiniops-rearrange-wrapper
Closed

refactor(ops): use InfiniOps Copy for rearrange#1478
voltjia wants to merge 1 commit into
refactor/migrate-infiniops-softmax-wrapperfrom
refactor/migrate-infiniops-rearrange-wrapper

Conversation

@voltjia

@voltjia voltjia commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

What

  • Replace RearrangeInfinilm with the canonical InfiniOps Copy API.
  • Pass non_blocking=false, preserving the current synchronous copy behavior.
  • Remove the obsolete adapter-blocking comment.

Alignment

InfiniCore wrapper InfiniOps call Alignment basis
rearrange(x, y) Copy(input=x, non_blocking=false, out=y) Tensor.copy_(src, non_blocking=False), InfiniOps Copy, InfiniOps #872, provider adaptation #897

InfiniOps keeps its C++ input/attribute/output ordering while retaining PyTorch's source tensor and non_blocking contract.

Why

The canonical Copy operator and CUDA adaptation are now available, so this adapter no longer needs the deprecated InfiniLM-specific rearrange class.

Scope

This is stacked on #1477. It changes only the InfiniOps adapter target; the public InfiniCore rearrange API and copy semantics remain unchanged.

Screenshots: N/A (backend adapter migration only).

Validation

Run on ssh nvidia in accelerator-dev/nvidia:latest on NVIDIA A100 GPUs:

  • Full infinicore_cpp_api and _infinicore build/install passed.
  • Python extension import and dynamic linking passed.
  • Existing NVIDIA suites completed after the copy migration: sigmoid 45/45, SiLU-and-mul 36/36, and conv2d 12/12.
  • python3 scripts/format.py --ref 850fb3f7 --path src --check with clang-format 16.0.6.
  • git diff --check.

@voltjia

voltjia commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #1480, which consolidates the canonical InfiniOps adapter migrations while preserving each logical change as a separate commit.

@voltjia voltjia closed this Aug 8, 2026
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