Skip to content
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

[wasm] Add transpose support to Max kernel. #3414

Merged
merged 12 commits into from
Jun 9, 2020
Merged

[wasm] Add transpose support to Max kernel. #3414

merged 12 commits into from
Jun 9, 2020

Conversation

annxingyuan
Copy link
Collaborator

@annxingyuan annxingyuan commented Jun 9, 2020

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

@annxingyuan annxingyuan changed the title [wasm] Add transpose support to Max / Min kernels. [wasm] Add transpose support to Max kernels. Jun 9, 2020
@annxingyuan annxingyuan changed the title [wasm] Add transpose support to Max kernels. [wasm] Add transpose support to Max kernel. Jun 9, 2020
Copy link
Contributor

@tafsiri tafsiri left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @annxingyuan, @dsmilkov, @lina128, @nsthorat, @pyu10055, and @tafsiri)


tfjs-backend-wasm/src/kernels/Max.ts, line 40 at r1 (raw file):

  let xShape = x.shape;
  const xRank = x.shape.length;
  const xVals = backend.typedArrayFromHeap(x);

Should this move inside the if(backend.dataIdMap.get ...) block? Is it used outside of that block


tfjs-backend-wasm/src/kernels/Max.ts, line 58 at r1 (raw file):

    if (backend.dataIdMap.get(xTransposed.dataId).id !== xId) {
      // If perm is not no-op.

could you expand this comment a bit, e.g. what is perm? also the double negative makes it slightly harder to ready. Maybe something like 'if x was permuted/transposed'

Copy link
Collaborator Author

@annxingyuan annxingyuan left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @dsmilkov, @lina128, @nsthorat, @pyu10055, and @tafsiri)


tfjs-backend-wasm/src/kernels/Max.ts, line 40 at r1 (raw file):

Previously, tafsiri (Yannick Assogba) wrote…

Should this move inside the if(backend.dataIdMap.get ...) block? Is it used outside of that block

Done


tfjs-backend-wasm/src/kernels/Max.ts, line 58 at r1 (raw file):

Previously, tafsiri (Yannick Assogba) wrote…

could you expand this comment a bit, e.g. what is perm? also the double negative makes it slightly harder to ready. Maybe something like 'if x was permuted/transposed'

Done

@annxingyuan annxingyuan merged commit 9b80a79 into master Jun 9, 2020
@annxingyuan annxingyuan deleted the wasm_max_t branch June 9, 2020 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants