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 working Onnxruntime Producer #254

Merged
merged 18 commits into from
May 8, 2024
Merged

Add working Onnxruntime Producer #254

merged 18 commits into from
May 8, 2024

Conversation

harrypuuter
Copy link
Contributor

This PR adds a generic implementation of an OnnxRuntimeProducer

include/ml.hxx Outdated
throw std::runtime_error("Number of input parameters does not match");
}

std::string replace_str = std::string("EVTID");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment here that this is only needed if an even/odd splitting used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your right, in the generic version, this is not required

include/ml.hxx Outdated
->debug("Inference time: {} mus", timer.RealTime() * 1000 * 1000);
return output;
};
auto df3 = df2.Define(outputname,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any definition of df2, is that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be

df1 = df.Define(outputname, 

Comment on lines 27 to 28
// std::unique_ptr<Ort::Session> session_ptr(session);
// sessions_map[modelPath] = std::move(session_ptr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented line can be dropped, I guess.

src/ml.cxx Show resolved Hide resolved
size_t inputTensorSize = vectorProduct(input_node_dims);
size_t outputTensorSize = vectorProduct(output_node_dims);

// outputTensorSize = 8;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be dropped.

@harrypuuter harrypuuter changed the base branch from cmake_restructure to main April 8, 2024 13:36
Copy link
Contributor

@nshadskiy nshadskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefineMassColumns can also be removed from ml.hxx. Otherwise everything fine!

@harrypuuter harrypuuter merged commit 78bd176 into main May 8, 2024
6 of 7 checks passed
@harrypuuter harrypuuter deleted the onnxruntime branch May 8, 2024 14:47
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