Skip to content

[tmva] Detach TMVA::DNN::TCpuTensor from TMVA::Experimental::RTensor - #23430

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:tmva-cpu-tensor
Sep 21, 2026
Merged

guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:tmva-cpu-tensor

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

TCpuTensor publicly derived from the experimental RTensor class. With RTensor being at the verge of getting deprecated from the public interface, TCpuTensor becomes standalone. It absorbs the storage (fShape, fStrides, fSize, fLayout, fData, fContainer), the stride/size helpers, and the accessors that DNN code uses (GetShape, GetStrides, GetSize, GetData, GetContainer, GetMemoryLayout, ReshapeInplace), with the exact same semantics as before. The unused inherited parts (iterators, Copy, Slice, Transpose, Squeeze, ExpandDims) are not carried over.

The MemoryLayout enum that was defined in RTensor.hxx is now owned by the DNN code as TMVA::DNN::MemoryLayout in CpuTensor.h; the CUDA headers keep their pre-existing local copy. All non-CUDA call sites (TCpu, MethodDL and the DNN test headers) are migrated accordingly.

Also drop the disabled RTensor conversion block in CudaTensor.cu, the commented-out references to RTensor.hxx in Reference.h and CudaTensor.h, and two dead 'using namespace TMVA::Experimental' declarations in test headers that only resolved through transitive RTensor includes.

TCpuTensor publicly derived from the experimental RTensor class. With
RTensor being at the verge of getting deprecated from the public
interface, TCpuTensor becomes standalone. It absorbs the storage
(fShape, fStrides, fSize, fLayout, fData, fContainer), the stride/size
helpers, and the accessors that DNN code uses (GetShape, GetStrides,
GetSize, GetData, GetContainer, GetMemoryLayout, ReshapeInplace), with
the exact same semantics as before. The unused inherited parts
(iterators, Copy, Slice, Transpose, Squeeze, ExpandDims) are not carried
over.

The MemoryLayout enum that was defined in `RTensor.hxx` is now owned by
the DNN code as `TMVA::DNN::MemoryLayout` in CpuTensor.h; the CUDA
headers keep their pre-existing local copy. All non-CUDA call sites
(TCpu, MethodDL and the DNN test headers) are migrated accordingly.

Also drop the disabled RTensor conversion block in CudaTensor.cu, the
commented-out references to RTensor.hxx in Reference.h and CudaTensor.h,
and two dead 'using namespace TMVA::Experimental' declarations in test
headers that only resolved through transitive RTensor includes.
@guitargeek guitargeek self-assigned this Sep 20, 2026
@guitargeek
guitargeek requested a review from lmoneta as a code owner September 20, 2026 20:46
@github-actions

github-actions Bot commented Sep 20, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 14h 40m 28s ⏱️
 3 875 tests  3 871 ✅ 0 💤 4 ❌
80 069 runs  80 061 ✅ 0 💤 8 ❌

For more details on these failures, see this check.

Results for commit a5b64dd.

♻️ This comment has been updated with latest results.

@guitargeek
guitargeek merged commit 0bf3bff into root-project:master Sep 21, 2026
55 of 61 checks passed
@guitargeek
guitargeek deleted the tmva-cpu-tensor branch September 21, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants