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

Dynamic Composable Kernel Initial Integration #1071

Merged
merged 46 commits into from
Aug 19, 2021

Conversation

asroy
Copy link
Contributor

@asroy asroy commented Jul 30, 2021

PR description

Add new dynamic composable kernel under:
src/composable_kernel/, which is pulled in as a "git subtree" from composable kernel repo
remote repo: https://github.com/ROCmSoftwarePlatform/composable_kernel
remote branch: master

Move old static composable kernel to:
src/kernels/static_composable_kernel/

Add a new iGEMM solver for Forward NCHW FP32/FP16/Int8 (int8 is not supported by ConvolutionContext so the solver support for Int8 cannot be used yet):
src/solver/conv_ck_igemm_fwd_v6r1_dlops_nchw.cpp::ConvCkIgemmFwdV6r1DlopsNchw , which is calls into composable kernel solver:
src/composable_kernel/host/driver_online/include/conv_igemm_fwd_v6r1_dlops_nchw_kcyx_nkhw.hpp::ConvIgemmFwdV6r1DlopsNchwKcyxNkhw

Sync between composable_kernel and MIOpen with "git subtree"

Screen Shot 2021-08-18 at 11 55 34 PM

Relation between MIOpen solver class ConvCkIgemmFwdV6r1DlopsNchw and composable_kernel class ConvIgemmFwdV6r1DlopsNchwKcyxNkhw

image

Chao Liu added 3 commits July 30, 2021 17:31
@ghost
Copy link

ghost commented Jul 30, 2021

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

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

👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !

If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin.

@asroy
Copy link
Contributor Author

asroy commented Jul 30, 2021

Previous review comment

[@atamazov] #1059 (comment)

Add new dynamic composable kernel under: src/composable_kernel/, which is pulled in as a "git subtree" from composable kernel repo

I am sorry but I do not remember the motivation for subtree... Where can I refresh my memory (mail thread or ticket in the repo...)?

[@asroy] #1059 (comment)

The motivation is to be able to sync composable kernel repo and MIOpen automatically.

We had the meeting in 07/06 "MIOpen and composable kernel", between you, @JehandadKhan @pfultz2, me and @zjing14. Subtree approach was suggested there

[@atamazov] #1059 (comment)

[Notice] Thanks for the explanation. Maybe I do not understand the meaning of "automatically" in this context. But would it allow something like a one-liner PR in MIOpen to completely change the implementation of the Solvers that employ composable kernels? If yes, then this looks dangerous to me.

@asroy

This comment has been minimized.

@asroy

This comment has been minimized.

Chao Liu added 6 commits August 6, 2021 21:32
5781adf5c Update develop (#5) (#6)
97e6d514f Merge pull request #4 from ROCmSoftwarePlatform/separate_online_compile
7b1ec41e5 refactor
49c33aaea refactor
54b3e73d1 rename

git-subtree-dir: src/composable_kernel
git-subtree-split: 5781adf5cf4ac753e2e36da7385791775b744bf7
@asroy
Copy link
Contributor Author

asroy commented Aug 7, 2021

I've removed online compilation code from this PR.
@atamazov @JehandadKhan @junliume

@asroy
Copy link
Contributor Author

asroy commented Aug 11, 2021

CI has passed. This PR is ready to be reviewed

@junliume
Copy link
Contributor

CI has passed. This PR is ready to be reviewed

Ping @pfultz2 @zjing14 @JehandadKhan @qianfengz for review :)

src/include/miopen/solver.hpp Show resolved Hide resolved
src/include/miopen/solver/ck_utility_common.hpp Outdated Show resolved Hide resolved
src/include/miopen/solver/ck_utility_common.hpp Outdated Show resolved Hide resolved
@asroy asroy requested a review from JehandadKhan August 13, 2021 20:56
JehandadKhan
JehandadKhan previously approved these changes Aug 17, 2021

template <AddressSpaceEnum_t BufferAddressSpace, typename T, typename ElementSpaceSize>
__host__ __device__ constexpr auto
make_dynamic_buffer(T* p, ElementSpaceSize element_space_size, T invalid_element_value)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use remove_cv_t<T> here to provide a simpler type for invalid_element_value, so that the calling codes don't have to make difficult adaption

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 will update this in CK repo master branch. Reduction PR will be able to use the update

@asroy
Copy link
Contributor Author

asroy commented Aug 18, 2021

@junliume @JehandadKhan CI just passed

@junliume
Copy link
Contributor

@junliume @JehandadKhan CI just passed

@asroy would you need to make more code changes? e.g. comments from #1071 (comment)

If not, any objections that we merge it tonight? (2000 CDT, 1800 PDT)

@asroy
Copy link
Contributor Author

asroy commented Aug 19, 2021

@junliume No more change is needed for this PR.

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.

4 participants