KEMBAR78
TF: XLA Logits Warpers by gante · Pull Request #16899 · huggingface/transformers · GitHub
Skip to content

Conversation

@gante
Copy link
Member

@gante gante commented Apr 22, 2022

What does this PR do?

This PR enables XLA on the logits warpers... which actually needed no changes. In essence, it adds XLA tests to ensure we don't regress.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Apr 22, 2022

The documentation is not available anymore as the PR was closed or merged.

@gante gante force-pushed the xla_logits_warper branch from 6f8b045 to 3ececfd Compare April 24, 2022 20:36
@gante
Copy link
Member Author

gante commented Apr 24, 2022

@patrickvonplaten Sorry, I know you've already reviewed this, but I'm going to re-request your review. I realized the tests were much easier to understand (and with fewer lines) if they were parametrized, instead of having two tests (one for XLA, another for non-XLA) with shared code 😅

@gante gante requested a review from patrickvonplaten April 24, 2022 20:38

def _get_repetition_penalty_inputs(self):
@parameterized.expand([(False,), (True,)])
def test_repetition_penalty_dist_process(self, use_xla):
Copy link
Member Author

Choose a reason for hiding this comment

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

changed this one from a two-test format (added in the previous PR) to the parametrized format

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

(Also you don't actually have to add my suggestions, I'm just being a jerk)

gante and others added 2 commits April 25, 2022 18:15
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
@gante gante merged commit 9331b37 into huggingface:main Apr 25, 2022
elusenji pushed a commit to elusenji/transformers that referenced this pull request Jun 12, 2022
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com>
@gante gante deleted the xla_logits_warper branch July 5, 2022 18:34
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.

4 participants