Skip to content

Conversation

@thevishalagarwal
Copy link
Owner

@thevishalagarwal thevishalagarwal commented Jun 17, 2025

pseudo code for compiled model compatibility

if(node->OpType() == EPCONTEXT_OP) {
auto& attrs = node->GetAttributes();
auto trt_engine = attrs.at(EP_CACHE_CONTEXT);
if(!trt::isValidEngine(trt_engine))
Copy link
Owner Author

Choose a reason for hiding this comment

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

Can we call TRT API from here? How do we initialize TRT runtime?

Copy link
Owner Author

@thevishalagarwal thevishalagarwal Jun 17, 2025

Choose a reason for hiding this comment

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

auto lock = GetApiLock();
runtime_ = std::unique_ptr<nvinfer1::IRuntime>(nvinfer1::createInferRuntime(GetTensorrtLogger(detailed_build_log_)));

* Recompile if not incompatible
*/
virtual common::StatusCode isValidCompiledModel(const onnxruntime::Graph& graph) {
return true;

Choose a reason for hiding this comment

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

you probably wanted to return MODEL_SUPPORTED_OPTIMAL here (or maybe MODEL_UNSUPPORTED)?

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.

3 participants