-
Notifications
You must be signed in to change notification settings - Fork 33
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
Upgrade TensorFlow to eaacee173897b77cdb6afd22d5e78154177a10f3 #363
Conversation
transposed_lhs, rhs, mul_params, ruy_context, &dst, bgemm_runtime_path, | ||
&binary_trmul_params); | ||
|
||
// pre-pack the lhs and rhs matrices | ||
ruy::PrepackedMatrix prepacked_lhs; | ||
ruy::PrepackedMatrix prepacked_rhs; | ||
ruy::SidePair<ruy::PrepackedMatrix*> prepacked(&prepacked_lhs, | ||
&prepacked_rhs); | ||
|
||
const ruy::SidePair<int> origin{0, 0}; | ||
const ruy::SidePair<int> rounded_dims{ | ||
binary_trmul_params.packed[ruy::Side::kLhs].layout.cols, | ||
binary_trmul_params.packed[ruy::Side::kRhs].layout.cols}; | ||
|
||
ruy::Tuning tuning = ContextInternal::GetMainThreadTuning(ruy_context); | ||
for (ruy::Side side : {ruy::Side::kLhs, ruy::Side::kRhs}) { | ||
if (prepacked[side]) { | ||
prepacked[side]->data_size = DataSize(binary_trmul_params.packed[side]); | ||
prepacked[side]->sums_size = SumsSize(binary_trmul_params.packed[side]); | ||
prepacked[side]->data = alloc_fn(prepacked[side]->data_size); | ||
prepacked[side]->sums = alloc_fn(prepacked[side]->sums_size); | ||
binary_trmul_params.packed[side].data = prepacked[side]->data; | ||
binary_trmul_params.packed[side].sums = prepacked[side]->sums; | ||
binary_trmul_params.RunPack(side, tuning, origin[side], | ||
rounded_dims[side]); | ||
binary_trmul_params.is_prepacked[side] = true; | ||
} | ||
} | ||
transposed_lhs, internal_rhs, mul_params, ruy_ctx, &internal_dst, | ||
bgemm_runtime_path, &binary_trmul_params); | ||
|
||
ruy::TrMul(&binary_trmul_params, ruy_context); | ||
HandlePrepackedCaching(&binary_trmul_params, ruy_ctx); | ||
ruy::TrMul(&binary_trmul_params, ruy_ctx); |
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.
here I was using the RUY's advanced API but it is completely removed in this commit. I need to dedicate more time to figure out how to replicate that.
f96d7c7
to
8b624bb
Compare
8b624bb
to
fef1bc8
Compare
The Then a second error got thrown, because RUY removed the |
38a0226
to
1562a38
Compare
Rebased on master. |
Just benchmarked this branch on the pixel. Quicknet got |
Thanks for integrating all the changes and fixing the PR |
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.
LGTM 👍
This fixes build problems after merging #363
This fixes build problems after merging #363
* Split weight-writer function into a process and interleave function * Move ProcessWeights function to its own file and make it layer-agnostic * Add extra bconv test with different filter count * Fix minor bug in output-transform MLIR pass * Move weight-processing to an MLIR prepare pass * Add process-weights step to conv unittest * Add new flip-weights function for the new filter layout * Bump Ikva tflite version number * Update Ikva model example to v0.3 with the latest converter * Add utility to re-generate model_data_example.cc if needed * Update lce-utils requirement for a new compute-engine release today
What do these changes do?
This PR upgrades the TensorFlow dependency in order to include
eaacee173897b77cdb6afd22d5e78154177a10f3
.Ruy heavily changed their internal API which requires quite a few code changes. A full diff of the changes in ruy can be seen here. This is a first stab at trying to adapt our kernels to the API changes.
How Has This Been Tested?
CI
Related issue number
This is a required update to enable easy int8 benchmarking in #357