Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Where are the C++ kernel implementation of the Winograd convolution algorithm? #1658

Closed
Redtorm opened this issue Jul 28, 2022 · 6 comments
Closed
Assignees
Labels

Comments

@Redtorm
Copy link

Redtorm commented Jul 28, 2022

I would like to know how MIOpen implements the Winograd convolution algorithm, but I only found the convolution kernel implemented in assembly language in the project source code, which is difficult to read and understand. I guess these assembly kernels should be converted from C++ kernels, but I can't find where the related C++ kernel implementations are, could you tell me where these C++ kernel implementation files are?

How can I add my own kernel to MIOpen? Is there a manual for this?

@Redtorm Redtorm changed the title Where are the details of the implementation of the Winograd convolution algorithm? Where are the C++ kernel implementation of the Winograd convolution algorithm? Jul 28, 2022
@junliume junliume added the request_for_comments See https://en.wikipedia.org/wiki/Request_for_Comments label Jul 28, 2022
@junliume
Copy link
Collaborator

@Kirpich30000 could you comment on the question?

@Kirpich30000
Copy link
Contributor

There is no C++ implementation - kernel were specifically designed for high efficiency and implemented from scratch in assembly.
You could look at this paper for Winograd introduction. And here is a reference code for constructing matrices if you want to try customized Winograd transformation.

@Kirpich30000
Copy link
Contributor

To add your own kernel you will need to add a solver and register it in solver.cpp. Peek any solver and look at the code to see how it is implemented. Some solvers use workspace, others - don't. Some solvers invokes only a single kernel, while the other could invoke multiple kernels to perform the operation.

@atamazov
Copy link
Contributor

@junliume I recommend removing request_for_comments (this is question, RFC is more like a spec-in-progress) and, maybe, closing this.

@DrizztDoUrden
Copy link
Contributor

Also to register the solver for the specific convolution (or not conv) calls it supports like these: https://github.com/ROCmSoftwarePlatform/MIOpen/blob/d19c2575ca918f6b63a022f004d591795afcd85d/src/mlo_dir_conv.cpp#L110

@atamazov
Copy link
Contributor

Intro info about solvers: #866

@junliume junliume added question and removed request_for_comments See https://en.wikipedia.org/wiki/Request_for_Comments labels Jul 29, 2022
@ROCm ROCm locked and limited conversation to collaborators Aug 10, 2022
@junliume junliume converted this issue into discussion #1686 Aug 10, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

7 participants