Skip to content

Comments

WiP: Improve graph execution steps#319

Closed
zolkis wants to merge 0 commit intowebmachinelearning:mainfrom
zolkis:improve-sync-async-execution
Closed

WiP: Improve graph execution steps#319
zolkis wants to merge 0 commit intowebmachinelearning:mainfrom
zolkis:improve-sync-async-execution

Conversation

@zolkis
Copy link
Collaborator

@zolkis zolkis commented Dec 20, 2022

Factor out graph resource validation.
Define generic graph execution steps and use them in the sync and async compute() methods.
Address #316.

@huningxin @wchao1115 @anssiko this requires not only a review, but possibly development.
Prose detailing implementation internals has been thin ice in specifications. We need to be generic and flexible to internal optimizations, yet express the intents clearly enough. Your help is needed, please.


Preview | Diff

index.bs Outdated
1. Let |outputDesc| be |graph|.{{MLGraph/[[outputDescriptors]]}}[|key|].
1. If the data type of |outputTensor| elements doesn't match the [=element type=] of {{ArrayBufferView}} |value|, then throw a "{{DataError}}" {{DOMException}} and stop.
1. If the byte length of |outputTensor| is not equal to |value|.\[[ByteLength]] and the [=byte length=] of |outputDesc|, then throw a "{{DataError}}" {{DOMException}} and stop.
1. Otherwise, set the values of |value| to the values of |outputTensor|.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Possibly improve the prose here for assigning vector elements from another vector.
Is this meant to be a copy, or can it be assignment?

@zolkis
Copy link
Collaborator Author

zolkis commented Dec 21, 2022

(Reason for forced push: mistyped the fixed issue number).

@zolkis zolkis force-pushed the improve-sync-async-execution branch from e17565e to 071498b Compare December 22, 2022 09:18
@anssiko
Copy link
Member

anssiko commented Jan 9, 2023

@zolkis, thanks! This PR is blocked by #323 that fixes a bug found during implementation. My suggestion is to get that bug fix PR merged first and then rebase this PR on top of it.

@anssiko
Copy link
Member

anssiko commented Jan 18, 2023

@zolkis #323 has been merged unblocking this work.

@zolkis zolkis closed this Jan 18, 2023
@zolkis zolkis force-pushed the improve-sync-async-execution branch from 071498b to 019a1f6 Compare January 18, 2023 19:00
@zolkis
Copy link
Collaborator Author

zolkis commented Jan 18, 2023

Needed to rework it completely, closed this and continued in #329.

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

Successfully merging this pull request may close these issues.

2 participants