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

Why sdp has two X module? #351

Open
FengJungle opened this issue Aug 6, 2021 · 5 comments
Open

Why sdp has two X module? #351

FengJungle opened this issue Aug 6, 2021 · 5 comments

Comments

@FengJungle
Copy link

image
As the picture shows, the X1 and X2 are totally the same, why there is two X module in SDP?

@FengJungle
Copy link
Author

And one more question: Compared with X1/X2, the difference in Y is the LUT. Why the SDP is X1 + X2 + Y(with LUT), but not a single X(with LUT)?
Could anyone share the design idea?
Thanks a lot!

@bg193
Copy link

bg193 commented Sep 19, 2021

从设计上看可能是为了支持算子融合

@FengJungle
Copy link
Author

从设计上看可能是为了支持算子融合

你是说,计算图中可能有相邻的两个使用到sdp的算子可以融合到一个sdp完成吗?看nvdla的compiler源码的确有这样的操作

@bg193
Copy link

bg193 commented Dec 3, 2021

从设计上看可能是为了支持算子融合

你是说,计算图中可能有相邻的两个使用到sdp的算子可以融合到一个sdp完成吗?看nvdla的compiler源码的确有这样的操作

理论上可以一个通路做bias,一个做norm

@FengJungle
Copy link
Author

嗯,实际上源码里也的确有这样的融合的优化处理。不过一个x+y模块也可以完成算子融合,我只是很奇怪为什么是两个x而不是1个或者3个?文档里也没有给出说明。所以就想问问大家的看法。

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

2 participants