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

关于MegEngine/dnn/src/cuda/conv_bias/matmul/inplace_matmul_impl.cu中的代码问题 #500

Open
BNAadministrator3 opened this issue Jan 29, 2023 · 4 comments

Comments

@BNAadministrator3
Copy link

问题1:这个文件中下面几个以“o”开头的变量各代表啥含义?

image

问题2:这个文件中的conv_kenrel()里‘offsetA’变量和‘offsetB’变量代表啥含义?

问题3:能否解释下conv_kernel()是如何并行的执行隐式卷积吗?没有看懂里面每个thread block是怎么执行卷积的

@momoComeOn
Copy link

momoComeOn commented Jan 29, 2023 via email

@Li-Ming-xin
Copy link

Li-Ming-xin commented Jan 30, 2023

@BNAadministrator3
问题1:这个文件中下面几个以“o”开头的变量各代表啥含义?
很抱歉,这里变量名应该是不太合适,导致了代码难以理解。所有的'o'应为'i',即input(src)的h和w索引;0、1、2、3表示连续的4个位置的索引。

问题2:这个文件中的conv_kenrel()里‘offsetA’变量和‘offsetB’变量代表啥含义?
offsetA表示filter中元素的索引,offsetB表示src(N,IC,IH,IW)中第一维n=0,1,2...时开始元素的索引。

问题3:能否解释下conv_kernel()是如何并行的执行隐式卷积吗?没有看懂里面每个thread block是怎么执行卷积的
使用im2col进行计算的,可参考https://zhuanlan.zhihu.com/p/63974249。

具体细节需要结合代码来理解,有不清楚的地方可以继续交流。

@BNAadministrator3
Copy link
Author

https://zhuanlan.zhihu.com/p/63974249。 这个链接是404...

@Li-Ming-xin
Copy link

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

No branches or pull requests

3 participants