-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C API 2.0 Tensor and TensorList #5799
base: main
Are you sure you want to change the base?
Conversation
04ef2a5
to
e27aa11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving some initial comments
// Interfaces | ||
////////////////////////////////////////////////////////////////////////////// | ||
|
||
class ITensor : public _DALITensor, public RefCountedObject { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we use this ISomething
convention in the code elsewhere?
tl_->Reset(); | ||
tl_->SetSize(num_samples); | ||
tl_->set_sample_dim(ndim); | ||
tl_->SetLayout(new_layout); | ||
tl_->set_type(dtype); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why sometimes it's like_that
and sometimes LikeThat
?
Validate(dtype); | ||
|
||
for (int i = 0; i < num_samples; i++) { | ||
if (ndim && !samples[i].shape) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: ndim > 0
?
@@ -0,0 +1,414 @@ | |||
// Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you testing non-contiguous tensor lists here?
Signed-off-by: Michał Zientkiewicz <[email protected]>
Signed-off-by: Michał Zientkiewicz <[email protected]>
Signed-off-by: Michał Zientkiewicz <[email protected]>
Signed-off-by: Michał Zientkiewicz <[email protected]>
Signed-off-by: Michał Zientkiewicz <[email protected]>
Signed-off-by: Michał Zientkiewicz <[email protected]>
e27aa11
to
361bf44
Compare
Category:
New feature (non-breaking change which adds functionality)
Description:
This PR adds wrappers for Tensor and TensorList that are later used to implement the C interface for those objects.
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A