Skip to content
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

[BUG] Composition between Tensor and Layout as shown in 03_tensor.md does not compile #1519

Open
armbuster opened this issue Apr 30, 2024 · 2 comments
Labels

Comments

@armbuster
Copy link

Describe the bug
I tried to compile and run this code which I copied directly from 03_tensor.md

auto tv_layout = Layout<Shape <Shape <_2,_4>,Shape <_2, _2>>,
                        Stride<Stride<_8,_1>,Stride<_4,_16>>{};  // (8,4)

// Construct a 4x8 tensor with any layout
Tensor A = make_tensor<float>(Shape<_4,_8>{}, LayoutRight{});    // (4,8)
// Compose A with the tv_layout to transform its shape and order
Tensor tv = composition(A, tv_layout);  

it fails to compile because there is no implementation of composition which takes a Tensor and a Layout. Is the documentation wrong? or has this feature not been implemented yet

Steps/Code to reproduce bug
try to build the above code

Expected behavior
the code compiles

Environment details (please complete the following information):
nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu20.04 image

Additional context

@armbuster armbuster added ? - Needs Triage bug Something isn't working labels Apr 30, 2024
@ccecka
Copy link

ccecka commented Apr 30, 2024

This was brought up here
#1486

That function is useful for examples and documentation, but never actually needed in practice. :-)

It will be included in our next update.

In the meantime, you can use tensor.compose(tiler) to accomplish the same thing.

Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants