Skip to content

Conversation

@jinjingforever
Copy link
Collaborator

@jinjingforever jinjingforever commented Sep 10, 2020

Also added a launch.json config to allow debugging in vscode


This change is Reviewable

@jinjingforever jinjingforever marked this pull request as ready for review September 10, 2020 23:59
@tafsiri tafsiri requested a review from lina128 September 11, 2020 15:00
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.

LGTM! Hope the process was relatively smooth.

I'll also let Na take a quick look.

Reviewed 4 of 4 files at r1.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @lina128 and @tafsiri)

Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

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

Hi Jing, this looks great, thank you! I left two minor comments, but LGTM overall. And can't wait to try the debugger!

Reviewable status: :shipit: complete! 2 of 1 approvals obtained (waiting on @jinjingforever and @lina128)


tfjs-backend-cpu/src/kernels/Cos.ts, line 19 at r1 (raw file):

import {Cos, CosInputs} from '@tensorflow/tfjs-core';
import {KernelConfig} from '@tensorflow/tfjs-core';

Merge above two lines.


tfjs-backend-cpu/src/kernels/Cos.ts, line 32 at r1 (raw file):

    assertNotComplex(x, 'cos');

    const values = cpuBackend.data.get(x.dataId).values as Float32Array;

as TypedArray, because the values can also be Int32Array.


tfjs-backend-cpu/src/kernels/Cos.ts, line 33 at r1 (raw file):

    const values = cpuBackend.data.get(x.dataId).values as Float32Array;
    const newValues = new Float32Array(values.length);

Use xSize. const xSize = util.sizeFromShape(x)

Copy link
Collaborator Author

@jinjingforever jinjingforever left a comment

Choose a reason for hiding this comment

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

Thank you Yannick and Na!

Reviewable status: :shipit: complete! 2 of 1 approvals obtained (waiting on @lina128)


tfjs-backend-cpu/src/kernels/Cos.ts, line 19 at r1 (raw file):

Previously, lina128 (Na Li) wrote…

Merge above two lines.

Done.


tfjs-backend-cpu/src/kernels/Cos.ts, line 32 at r1 (raw file):

Previously, lina128 (Na Li) wrote…

as TypedArray, because the values can also be Int32Array.

Done.


tfjs-backend-cpu/src/kernels/Cos.ts, line 33 at r1 (raw file):

Previously, lina128 (Na Li) wrote…

Use xSize. const xSize = util.sizeFromShape(x)

Done.

@jinjingforever jinjingforever merged commit eae06b5 into master Sep 11, 2020
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.

4 participants