NVIDIA / NVIDIA/cutlass

[QST] Questions about correctness test and layout

Open
#1,756 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

? - Needs Triage inactive-30d inactive-90d question
Dominant language
C++
Stars
10.5k
Forks
2.1k
Avg merge
3d 11h
Merged PRs (30d)
7

Description

Hello, I have several question using CUTLASS. It would be very much appreciated to be answered.

  1. How to know if I am calling CUTLASS code correctly?
    I am using matrix A (M x K), matrix B (N x K), matrix C (M x N) and calling cutlass call like below. I transposed B and provided A, B^T and C as argument, which aligns with the layout in the picture. Each A, B, C are half precision, and accumulator is fp32.

Image

I am also calling CUBLAS kernel, but this time providing A and B, making kernel transpose by itself.

Image

When I compare the result for M = N = K = 4096, I see maximum error of 0.25, which seems to be above 0.05 default value given for CUTLASS profiler. I wonder whether changes in instruction shape, warp size or thread block size affects error value. I am using shapes like this picture.

Image

Should I be getting 0 error to know whether I am calling the same kernel with same layout setting?
What is epilson and non-zero floor in this function used by CUTLASS profiler?

Image

  1. What is the correlation between thread block shape, warp shape and instruction shape?
    If I use any of the warp shapes given in documentation of picture below, it gives me error in the second picture.
    Thus, none of the warp shapes I can use to directly use to call GemmUniversal.

Image

Image

Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CUTLASS profiler's epsilon and non-zero floor behavior, then trace the GemmUniversal usage and the reported matrix layouts against the CUBLAS comparison. A useful resolution should explain the observed numerical difference, how thread block, warp, and instruction shapes relate, and which documented warp shapes are valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc, performance
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.