Skip to content

How to understand the layout mapping in MMA Traits? #1381

Answered by ccecka
MARD1NO asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like a slideware typo to me.

The following program

#include <cute/tensor.hpp>
using namespace cute;

int main()
{
  using MMA = MMA_Traits<SM80_16x8x8_F32F16F16F32_TN>;
  print("ALayout: "); print(typename MMA::ALayout{}); print("\n");
  print("BLayout: "); print(typename MMA::BLayout{}); print("\n");
  print("CLayout: "); print(typename MMA::CLayout{}); print("\n");
}

prints

ALayout: ((_4,_8),(_2,_2)):((_32,_1),(_16,_8))
BLayout: ((_4,_8),_2):((_16,_1),_8)
CLayout: ((_4,_8),(_2,_2)):((_32,_1),(_16,_8))

which makes a lot more sense: ALayout has size-4 in the V-mode and BLayout has size-2 in the V-mode.

Looks like you've got the right idea, but check out the MMA_Atom documentation a…

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@ccecka
Comment options

@thakkarV
Comment options

thakkarV Mar 8, 2024
Collaborator

@wanghongyu2001
Comment options

@thakkarV
Comment options

thakkarV Mar 8, 2024
Collaborator

@lee-bin
Comment options

Answer selected by MARD1NO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants