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

Fix conditional in material that no longer works #10

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

btalamini
Copy link
Collaborator

Replacing the lax.cond(...) with an np.where(...) fixes the problem for now. It may not be ideal from an efficiency standpoint, because I think this makes the false conditional branch get executed (with the result discarded). I think this is related to this issue: jax-ml/jax#3103, which indicates to me that the efficiency problem is unavoidable until Jax solves the issue. In the meantime, this is a workaround.

See b7d1dd2.

@btalamini btalamini requested a review from ralberd June 1, 2022 19:35
@ralberd ralberd merged commit 2db0574 into sandialabs:main Jun 1, 2022
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