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

Add try catch of Enzyme #1129

Open
wsmoses opened this issue Sep 28, 2024 · 0 comments
Open

Add try catch of Enzyme #1129

wsmoses opened this issue Sep 28, 2024 · 0 comments

Comments

@wsmoses
Copy link

wsmoses commented Sep 28, 2024

Now with some of the latest updates, Enzyme will throw specific errors for why it cannot differentiate a function.

Scimlsensitivity should use these errors to select the particular way to use enzyme.

For example,

autodiff(mode, f, args...) could throw a mutability error which necessitates the (current default) use of autodiff(mode, Duplicated(f,make_zero(f)), args...)

Similarly it could throw a runtime activity error which necessitates the use of autodiff(set_runtime_activity(mode), ...)

This way scimlsensitivity can use enzyme for as much as possible [and at maximum performance]

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

No branches or pull requests

1 participant