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

igemm WrW invokers #233

Merged
merged 14 commits into from
Jun 30, 2020
Merged

igemm WrW invokers #233

merged 14 commits into from
Jun 30, 2020

Conversation

DrizztDoUrden
Copy link
Contributor

@DrizztDoUrden DrizztDoUrden commented May 21, 2020

Blocker for #203 as some of the solvers here are tunable.

@DrizztDoUrden DrizztDoUrden self-assigned this May 21, 2020
@ghost
Copy link

ghost commented May 21, 2020

Congratulations 🎉. DeepCode analyzed your code in 2.588 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

👉 View analysis in DeepCode’s Dashboard | Configure the bot

@daniellowell
Copy link
Contributor

Reviews?

@DrizztDoUrden
Copy link
Contributor Author

DrizztDoUrden commented Jun 11, 2020

I just pray not to have any more solver merges here. They are trivial but require a hell lot of testing to be sure it's good to go. I will enjoy the stuff in the Run and Measure PR anyway.

@daniellowell
Copy link
Contributor

Ok, let's have this one next to merge.
We need some reviews though!

@DrizztDoUrden
Copy link
Contributor Author

Sure

Copy link
Contributor

@atamazov atamazov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no 🤦
dontmakeitso

else
{
result.invoker_factory = [](const std::vector<Kernel>& kernels) {
return [=](const Handle& handle, const boost::any& primitve_params) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SetTensor is missing for fp32. Please take a look at the deleted line 4212 in convolutionocl.cpp file in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, will fix that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG

Copy link
Contributor Author

@DrizztDoUrden DrizztDoUrden Jun 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how it passed tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't won in your tests. This issue leads to correctness issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean there are long tests which should test something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this solver is a new iGemm that produces much more "universal" kernels (like Winograd, so that one kernel fits many problem configs) but the cost is performance drop. So it is quite possible that it never wins in our CI tests.

/cc @daniellowell

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, what would be interesting to have is a Find mode that also does verification. A self-testing feature.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea 🔥

Copy link
Contributor

@atamazov atamazov Jun 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we can make it so right now. The driver could register callbacks in the library. The library should invoke callback when Solvers are being evaluated, after each Invok'ation. The driver verifies output buffer. Done. Ha.

Copy link
Contributor

@atamazov atamazov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please throw in MakeImplGemmDataInvokerFactory() if ctx.direction.IsBackwardWrW() is true.

else
{
result.invoker_factory = [](const std::vector<Kernel>& kernels) {
return [=](const Handle& handle, const boost::any& primitve_params) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know im knit-picking but are you trying to say 'primitive_params' instead of primitve_params? throughout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, thank you. I guess I should install a spellchecker for the VS xD

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👁️

@DrizztDoUrden
Copy link
Contributor Author

@atamazov I have fixed the missing invoker

@atamazov
Copy link
Contributor

I see, thanks. Will re-test soon. Besides, develop is currently blocked for merging due to CI issues, @daniellowell is working of resolving those.

@atamazov

This comment has been minimized.

@daniellowell
Copy link
Contributor

I merged develop into this branch. It should pass the CI. Final reviews please.

TejashShah
TejashShah previously approved these changes Jun 19, 2020
@atamazov

This comment has been minimized.

@daniellowell
Copy link
Contributor

@atamazov @alexandraBara Let's move this PR forward.

@DrizztDoUrden DrizztDoUrden mentioned this pull request Jun 29, 2020
@atamazov
Copy link
Contributor

Just finished rigorous testing session, collecting results...

@alexandraBara Please free to ask @DrizztDoUrden about details of design & implementation. We would like to share knowledge with anyone who wants. Questions make this easier for us.

Copy link
Contributor

@atamazov atamazov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@atamazov
Copy link
Contributor

🌀 Testing results

No performance or correctness regressions among 93 FP32 and 93 FP16 configs, Radeon VII, ROCm 3.5. Both Normal Find and Immediate modes examined.

@JehandadKhan
Copy link
Collaborator

@alexandraBara Please free to ask @DrizztDoUrden about details of design & implementation. We would like to share knowledge with anyone who wants. Questions make this easier for us.

Can we get a design document ?

@DrizztDoUrden
Copy link
Contributor Author

@JehandadKhan On what specifically? This pr is about WrW igemm invokers, which are 99% copy-paste from old calling code from conv...ocl.cpp
Do you want a manual on how to make an invoker?

@atamazov
Copy link
Contributor

@JehandadKhan

Can we get a design document ?

Basic info can be found at #216. We plan to further elaborate explanations using the questions coming from interested individuals.

@daniellowell daniellowell merged commit 2cea40b into develop Jun 30, 2020
@DrizztDoUrden DrizztDoUrden deleted the ddu/impl-gemm-invokers branch September 9, 2020 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants