Coder Social home page Coder Social logo

Comments (5)

ccecka avatar ccecka commented on September 18, 2024 1

Thanks, that's actually a pretty serious bug and affects all functions that have an overload for Tensor&& and a generic overload (typically for IntTuple const&). These appear to include
flatten
coalesce
filter_zeros
take

Previously, this has been solved by renaming functions -- see group_modes vs group and filter versus filter_tuple. Rather than that, we should probably just do the rref three-step dance for those functions

template <class Engine, class Layout>
CUTE_HOST_DEVICE constexpr auto
flatten(Tensor<Engine,Layout> const& tensor) {
  return make_tensor(tensor.data(), flatten(tensor.layout()));
}

template <class Engine, class Layout>
CUTE_HOST_DEVICE constexpr auto
flatten(Tensor<Engine,Layout>& tensor) {
  return make_tensor(tensor.data(), flatten(tensor.layout()));
}

template <class Engine, class Layout>
CUTE_HOST_DEVICE constexpr auto
flatten(Tensor<Engine,Layout>&& tensor) {
  return make_tensor(tensor.data(), flatten(tensor.layout()));
}

I'll make sure this gets fixed as soon as possible.

from cutlass.

cloudhan avatar cloudhan commented on September 18, 2024

@thakkarV @ccecka Pls take a look.

from cutlass.

ccecka avatar ccecka commented on September 18, 2024

There's no pointer or tensor type.

Tensor a = make_tensor<float>(make_shape(_4{}, _1{}));          // Owning tensor
Tensor b = make_tensor(my_float_ptr, make_shape(_4{}, _1{}));   // Non-owning tensor

Your version should not compile, but could have a better error message.

from cutlass.

cloudhan avatar cloudhan commented on September 18, 2024

@ccecka I updated the issue code sample. The problem is coalesce(tensor) will dispatch to coalesce(Shape s) when tensor is defined out side of function bad

a.k.a, the error message

"auto cute::coalesce(const Shape &) [with Shape=cute::Tensor<cute::ArrayEngine<...

from cutlass.

thakkarV avatar thakkarV commented on September 18, 2024

fixed with #1623

from cutlass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.