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

Refactor bernoulli kernel to align with PyTorch semantics #610

Merged
merged 6 commits into from
Jul 22, 2024

Conversation

xytintel
Copy link
Contributor

@xytintel xytintel commented Jul 17, 2024

PyTorch requires that Bernoulli kernel should not generate probabilities equal to 0 or 1.
Fixed UT:

test_ops_gradients_xpu.py:

  • test_fn_grad_bernoulli_xpu_float64

test_torch_xpu.py:

  • test_bernoulli_edge_cases_xpu_float16

@xytintel xytintel marked this pull request as draft July 17, 2024 10:28
@xytintel xytintel marked this pull request as ready for review July 18, 2024 07:29
@fengyuan14
Copy link
Contributor

image

@fengyuan14 fengyuan14 added this pull request to the merge queue Jul 22, 2024
Merged via the queue into main with commit 20a494d Jul 22, 2024
2 checks passed
@fengyuan14 fengyuan14 deleted the xyt/fix_bernoulli branch July 22, 2024 10:52
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