NVIDIA / NVIDIA/cutlass

[QST] Universal convolution supports for sm70/80 using Cute?

Open
#1,785 3 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

What is your question?

I've read the example 59, it seems there is a easy and elegant way to assemble a conv kernel by using Cute, but the conv params are assumed to be known at complie time, and if I made these params determined during runtime, the tiling cannot work correctly when shape<n, p, q> cannot divisable by the tiler(E.g., npq are Shape<128, 14, 14>, while tiler is Shape<_128>(Actually, it should be qpn Shape<14, 14, 128> since the tiler always start tiling from the first dim)).

I would like to assemble a conv kernel using Cute to handle universal padding/stride, or in other words, R/S/P/Q is determined in runtime period. It seems only sm90 conv features can handle these universal cases, but I can't apply it on my workstation. I try to migrate it to sm70/80 but the TileCopy for im2col is complicated, I can't understand the parts that linearize the npq shape and strides, and seems it's related to sm90 hardware intrinsics.

I'm greatly appreciate if there's a approach to write a universal conv kernel using Cute while I can avoid using sm90 im2col intrinsics.

Thank you so much!

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 example 59 and the Cute convolution code, then inspect the sm90 im2col TileCopy path and the corresponding sm70/80 support. Trace how runtime R/S/P/Q values and the npq shape are linearized when dimensions are not divisible by the tiler. Done means establishing a universal-padding/stride convolution approach that works on sm70/80 without sm90 im2col intrinsics.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.