Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QST] How to define a new custom kernel #1930

Open
IzanCatalan opened this issue Nov 8, 2024 · 2 comments
Open

[QST] How to define a new custom kernel #1930

IzanCatalan opened this issue Nov 8, 2024 · 2 comments

Comments

@IzanCatalan
Copy link

What is your question?
Hi, I want to define a new convolution2d kernel Fprop based on the bare convolution kernel.

My idea is to modify the weights or filters before the convolution operation.

I would need a little help to know or understand how Cutlass allows the definition of a new custom kernel and how it is executed later in the GPU (my GPU is a Tesla v100).

I am a little confused by looking at examples like the number 9 on how I must perform the modification of the weights or filters because it seems only to execute templates to other templates like default convolution but no operation is performed.

Any help or link to a clarifier example on how to program my kernel and later use it or a base explanation would be appreciated.

Thank you.

@thakkarV
Copy link
Collaborator

thakkarV commented Nov 8, 2024

I'd recommend you start with example 59 and modify that to use Volta MMA and mainloop. This is much easier to do using the 3.x API.

@IzanCatalan
Copy link
Author

@thakkarV I'm sorry if I'm very new to the cutlass/volta environment, but could you tell me how to adapt or at least the convolution API or an example of what to modify to adjust my code to Volta MMA? Because I've only found https://nvidia.github.io/cutlass/ and https://github.com/NVIDIA/cutlass/blob/main/media/docs/gemm_api_3x.md

When you refer to main loop, which code segment do you mean? In the .cu of the example, no loop performs the convolution; it is only in the .h file line 309. Is this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants