Replies: 1 comment 1 reply
-
|
This is documented in the paper, but unfortunately is not checked in CuTe C++. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My mental model (corrections welcome):
the algebra is developed in Paper 1 and
Paper 2.
composition(f, g)asf ∘ g, so the contract should becomposition(f, g)(i) == f(g(i))for alli ∈ [0, size(g))— providedthe admissibility (stride/shape divisibility) preconditions hold.
What I see:
Output (trimmed):
The confusion:
gof = composition(g, f) = (4,4):(9,15)satisfiesgof(i) == g(f(i))for alli. As expected.fog = composition(f, g) = (2,10):(9,5)does not: it diverges fromf(g(i))ati = 2. So the returned layout isn'tf ∘ g.f ∘ gto be inadmissible: composingfwithg's mode20:3strides throughfby 3, butf's leading shape is 4 and3 ∤ 4.Questions:
(2,10):(9,5)just "garbage out" from a violatedprecondition (i.e. my responsibility to check), or should
compositionhaverejected it?
fully static operands (
_4,Int<20>,_3), I'd have hoped for astatic_asserthere — is this a case that can't be caught, or a gap?can guard my own call sites?
The issues 2133, and 2411, are also exploring the opposite of this doubt, where valid composition raise assertion errors.
Environment:
e406c186…, tag v4.5nvcc -std=c++17 --expt-relaxed-constexpr --extended-lambda -arch=sm_120 -I.../cutlass/includeBeta Was this translation helpful? Give feedback.
All reactions