-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
xpu: _spatial_transformer_fuse_pass #10054
Conversation
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其它 comment 参考 #10052
2cd3a88
to
85692bc
Compare
7ffddc2
to
512600b
Compare
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_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加后下划线
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
template <typename T> | ||
struct identity { | ||
typedef T type; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
统一命名
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
SpatialTransformer 子图识别和替换(Pass/OP/Compute/Param)