Skip to content

Conversation

linkk08
Copy link
Contributor

@linkk08 linkk08 commented Mar 1, 2023

SpatialTransformer 子图识别和替换(Pass/OP/Compute/Param)

@paddle-bot
Copy link

paddle-bot bot commented Mar 1, 2023

Thanks for your contribution!

Copy link
Collaborator

@zhupengyang zhupengyang left a comment

Choose a reason for hiding this comment

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

其它 comment 参考 #10052

@linkk08 linkk08 force-pushed the xpu_st2 branch 3 times, most recently from 2cd3a88 to 85692bc Compare March 3, 2023 08:33
@linkk08 linkk08 force-pushed the xpu_st2 branch 4 times, most recently from 7ffddc2 to 512600b Compare March 3, 2023 10:00
Comment on lines +67 to +72
std::vector<const float *> arg_fc_bias_;
std::vector<const float *> arg_ln_scale_;
std::vector<const float *> arg_ln_bias_;
std::vector<const float *> arg_gn_scale_;
std::vector<const float *> arg_gn_bias_;
std::vector<const float *> arg_conv_bias_;
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove

Comment on lines +52 to +65
xft::SpatialTransformerFusionParam st_param;
std::vector<xft::xftVec<float>> xft_gn_weights;
std::vector<xft::xftVec<float>> xft_gn_bias;
std::vector<xft::xftVec<float>> xft_ln_weights;
std::vector<xft::xftVec<float>> xft_ln_bias;
std::vector<xft::xftMat<int16_t>> xft_q_weights;
std::vector<xft::xftMat<int16_t>> xft_k_weights;
std::vector<xft::xftMat<int16_t>> xft_v_weights;
std::vector<xft::xftMat<int16_t>> xft_attn_fc_weights;
std::vector<xft::xftVec<float>> xft_attn_fc_bias;
std::vector<xft::xftMat<int16_t>> xft_geglu_fc_weights;
std::vector<xft::xftVec<float>> xft_geglu_fc_bias;
std::vector<xft::xftTensor<int16_t, 4>> xft_conv_weights;
std::vector<xft::xftVec<float>> xft_conv_bias;
Copy link
Collaborator

Choose a reason for hiding this comment

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

加后下划线

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +34 to +37
template <typename T>
struct identity {
typedef T type;
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +27 to +36
static std::vector<int> Vec2DTo1D_int(
const std::vector<std::vector<int>>& vec) {
std::vector<int> res;
for (const auto& v : vec) {
for (const auto& ele : v) {
res.emplace_back(ele);
}
}
return res;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

统一命名

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@zhupengyang zhupengyang merged commit 3f0b7a3 into PaddlePaddle:develop Mar 6, 2023
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.

2 participants