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

Help Running Custom Python Functions in "Eager-like" Mode #506

Open
arshad171 opened this issue Oct 3, 2023 · 0 comments
Open

Help Running Custom Python Functions in "Eager-like" Mode #506

arshad171 opened this issue Oct 3, 2023 · 0 comments

Comments

@arshad171
Copy link

Hi,

I am new HeteroCL, but I am familiar with TensorFlow, PyTorch, and the graph execution paradigm (from earlier versions of TensorFlow).

One of the tools I use for analysing ML algorithms uses heterocl to optimize a partial differential equation (HJI). In a nutshell, the library builds a heterocl graph with inputs state, inputs and returns a new state new_state = f(state, inputs). Expressing the new_state in terms of state and inptuts is quite straight forward if the relations can be broken down into addition, multiplication operations.

However, I would like to run a model prediction to generate the new state, i.e. new_state = my_ml_model.predict(state, inputs), which requires access to the values (numpy array) during the graph execution (analogous to eager execution in TensorFlow).

Is it possible to fetch the numpy array during the graph execution so that I run a ML prediction and return back a hcl.Tensor?

I would really appreciate your help~

Thanks,
Arshad

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