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

The preload_runtime() method should return an error code or bool value #108

Closed
AaronRobinsonMSFT opened this issue Feb 7, 2022 · 1 comment · Fixed by #109
Closed

The preload_runtime() method should return an error code or bool value #108

AaronRobinsonMSFT opened this issue Feb 7, 2022 · 1 comment · Fixed by #109
Labels
enhancement New feature or request

Comments

@AaronRobinsonMSFT
Copy link
Owner

There is no present way to preload the runtime without an abort being called in the process. This is related to #99. Ideally the preload_runtime() should be updated to return an indication if the runtime failed to load and let the application proceed normally.

DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE preload_runtime(void)

Note that this would not impact the scenario where a user directly calls an export and expects the system to lazily load the runtime.

@AaronRobinsonMSFT AaronRobinsonMSFT added the enhancement New feature or request label Feb 7, 2022
@rlcomstock
Copy link

rlcomstock commented Feb 7, 2022

We could introduce a new preload_runtime_check(void) function that calls into prepare_runtime with a bool that tells it if it should abort or return true/false. That would make the same behavior for the normal call, but change it so a precheck can be made that doesn't abort/assert.

We could also return an error code. Which might just be simple and elegant. I am open for either solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants