-
Notifications
You must be signed in to change notification settings - Fork 152
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
Android example throws runtime error. #77
Comments
Thank you for reporting this @tyler274 ! This is due to a change that was added this weekend to support asynchronous and parallel operations, namely #75 and #73. The fix for this is simple, and you have two options:
For option #2, you will need to run the tensor creation on a separate sequence. Namely, you have to change this part: if (std::shared_ptr<kp::Sequence> sq =
mgr.getOrCreateManagedSequence("createTensors").lock()) {
sq->begin();
sq->record<kp::OpTensorCreate>(params);
sq->end();
sq->eval();
// Record op algo base
sq->begin();
sq->record<kp::OpTensorSyncDevice>({ wIn, bIn }); To this: std::shared_ptr<kp::Sequence> sqTensor =
mgr.createManagedSequence().lock();
sqTensor->begin();
sqTensor->record<kp::OpTensorCreate>(params);
sqTensor->end();
sqTensor->eval();
std::shared_ptr<kp::Sequence> sq = mgr.createManagedSequence().lock();
sq->begin();
sq->record<kp::OpTensorCreate>(params);
sq->end();
sq->eval();
// Record op algo base
sq->begin();
sq->record<kp::OpTensorSyncDevice>({ wIn, bIn }); This is something you can find in the For now, I recommend you to go for option 1 - I will update the examples now so they work with the recent 0.4.0 release. |
@tyler274 this now has been fixed in master, if you pull the latest you should be able to build - I just tested it with Android studio as well: I'll re-open issue to confirm it has been fixed on your side. |
Thanks I'll check out master in the morning.
…On Tue, Oct 20, 2020, 2:08 AM Alejandro Saucedo ***@***.***> wrote:
@tyler274 <https://github.com/tyler274> this now has been fixed in
master, if you pull the latest you should be able to build - I just tested
it with Android studio as well:
[image: image]
<https://user-images.githubusercontent.com/1447507/96546876-02bf6900-12a3-11eb-9722-0d48e7c64093.png>
I'll re-open issue to confirm it has been fixed on your side.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7UPAY3IJWP7NLRCAX5EW3SLUSOZANCNFSM4SXS5K4A>
.
|
Works on master, thanks! |
Great - thanks for confirming @tyler274 |
in
void OpTensorSyncDevice::init()
coming from
void KomputeModelML::train
in the app's code.
The text was updated successfully, but these errors were encountered: