Skip to content

fix(ops): copy convolution tensor metadata views - #887

Merged
voltjia merged 1 commit into
masterfrom
fix/conv-metadata-view-copy
Aug 7, 2026
Merged

fix(ops): copy convolution tensor metadata views#887
voltjia merged 1 commit into
masterfrom
fix/conv-metadata-view-copy

Conversation

@voltjia

Copy link
Copy Markdown
Collaborator

Summary

  • Copy convolution tensor shapes and strides into owned metadata containers.
  • Restore compatibility with the current InfiniRT TensorView metadata-view API.
  • Keep all convolution operator names, parameters, outputs, and execution behavior unchanged.

Motivation

InfiniRT now returns ShapeView and StridesView from lvalue TensorView objects. The direct assignments introduced with the canonical convolution operators in #882 therefore fail to compile against current InfiniRT. Explicit Tensor::Shape{...} and Tensor::Strides{...} construction matches the existing bias metadata path and works for both owned containers and metadata views.

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

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

scripts/dev/build.sh nvidia --jobs 16
[build] done
PYTHONPATH=build-nvidia/install pytest -q tests/test_conv2d.py --devices nvidia --maxfail=1
18 passed, 1 warning in 7.40s

Test Results on Supported Platforms

PlatformAffectedBuild / Smoke ResultFull Result / Notes
CPUYeswrapper build passed with WITH_CPU=ONNo CPU convolution provider
NVIDIAYesbuild passedfocused conv2d: 18 passed
IluvatarYesnot run locallypending platform CI
MetaXYesnot run locallypending platform CI
CambriconNoN/AN/A
MooreYesnot run locallypending platform CI
AscendNoN/AN/A

Benchmark / Performance Impact

N/A. This only makes existing metadata copies explicit.

Notes for Reviewers

  • No public operator schema changes are included, so the PyTorch alignment established in feat(ops): add PyTorch-aligned convolution operators #882 is unchanged.
  • clang-format 21.1.8 --dry-run --Werror src/common/op_utils/conv.h passed.
  • The dependent InfiniCore adapters for Conv2d, Copy, Relu, and SiluAndMul compile successfully against this commit and current InfiniRT.

@voltjia
voltjia requested a review from a teamAugust 6, 2026 11:24
@voltjia
voltjia merged commit 4015361 into masterAug 7, 2026
17 of 20 checks passed
@voltjia
voltjia deleted the fix/conv-metadata-view-copy branch August 7, 2026 07:24
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