Skip to content

Commit

Permalink
Merge pull request #294 from fixstars/fix/graph-cuda-interop
Browse files Browse the repository at this point in the history
fix graph jit context
  • Loading branch information
iitaku authored Jul 8, 2024
2 parents 18be51f + 3869542 commit 9c57b7f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/ion/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ class Graph {
* Run the pipeline immediately.
*/
void run();
/**
* Set the user context which will be applied the pipeline built with this graph.
* @arg user_context_ptr: The pointer to the user context.
*/
Graph& set_jit_context(Halide::JITUserContext *user_context_ptr);

/**
* Get the node list.
Expand Down
6 changes: 6 additions & 0 deletions src/graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ Node Graph::add(const std::string& name)
return n;
}

Graph& Graph::set_jit_context(Halide::JITUserContext *user_context_ptr) {
impl_->jit_ctx_ptr = user_context_ptr;
return *this;
}


void Graph::run()
{
if (!impl_->pipeline.defined()) {
Expand Down

0 comments on commit 9c57b7f

Please sign in to comment.