Skip to content

[INTEL MKL] Added bf16 support for Sparse_Xent_op. - #43920

Closed
vishakha-nervana wants to merge 15 commits into
tensorflow:masterfrom
Intel-tensorflow:vishakh1/sparse_bf16_support
Closed

vishakha-nervana wants to merge 15 commits into
tensorflow:masterfrom
Intel-tensorflow:vishakh1/sparse_bf16_support

Conversation

@vishakha-nervana

@vishakha-nervana vishakha-nervana commented Oct 9, 2020 •

Copy link
Copy Markdown
Contributor

Added bf16 support for Sparse_Xent_op.

@google-ml-butler google-ml-butler Bot added the size:M CL Change Size: Medium label Oct 9, 2020
@google-cla google-cla Bot added the cla: yes label Oct 9, 2020
@gbaned gbaned self-assigned this Oct 10, 2020
@gbaned gbaned added the comp:mkl MKL related issues label Oct 10, 2020
@gbaned
gbaned requested a review from penpornk October 10, 2020 03:20
@gbaned gbaned added the awaiting review Pull request awaiting review label Oct 13, 2020
@vishakha-nervana

Copy link
Copy Markdown
Contributor Author

@penpornk Hello Penporn, Can you please provide review on this PR? Please let me know, if there is any concern.

@gbaned

gbaned commented Oct 30, 2020

Copy link
Copy Markdown
Contributor

@vishakha-nervana Can you please resolve conflicts? Thanks!

@gbaned gbaned added stat:awaiting response Status - Awaiting response from author and removed awaiting review Pull request awaiting review labels Oct 30, 2020

@penpornk penpornk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the PR and I'm so sorry for the delay! I have minor comments.

Comment on lines +192 to +194
casted_features = math_ops.cast(np_features, dtypes.bfloat16)
casted_loss = math_ops.cast(np_loss, dtypes.bfloat16)
casted_backprop = math_ops.cast(np_backprop, dtypes.bfloat16)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: The more standard past participle form of cast is cast, but the name cast_features doesn't make the purpose of the variable as obvious as casted_features...

Can we use np_features_bf16, np_loss_bf16, and np_backprop_bf16?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This hasn't been addressed yet.

@google-cla

google-cla Bot commented Nov 12, 2020

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla Bot added cla: no and removed cla: yes labels Nov 12, 2020
@google-cla

google-cla Bot commented Nov 12, 2020

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla

google-cla Bot commented Nov 13, 2020

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla

google-cla Bot commented Nov 13, 2020

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla

google-cla Bot commented Nov 13, 2020

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@penpornk penpornk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the changes. There is one unaddressed comment and I have one more nit. Then we should be good to go.

The CLA complaint is because some commits are by [email protected] which is not associated with your github account. Can you try adding this email to your github account (in Settings)? If that doesn't work, please post here that the commits by [email protected] are indeed by you and I can manually override the CLA.

errors::InvalidArgument(
"logits and labels must have the same first dimension, "
"got logits shape ",
"got logits shape " ,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: Please remove the extra space before comma.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@penpornk Please ignore this PR, there have issues with my git config, thats why some changes, do not show up with correct id, I am creating new PR, then I will close this one.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Got it. Please tag me in the new PR when it's ready. Thank you very much!

Comment on lines +192 to +194
casted_features = math_ops.cast(np_features, dtypes.bfloat16)
casted_loss = math_ops.cast(np_loss, dtypes.bfloat16)
casted_backprop = math_ops.cast(np_backprop, dtypes.bfloat16)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This hasn't been addressed yet.

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: no comp:mkl MKL related issues size:M CL Change Size: Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants