Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit 9b28719

Browse files
authored
Merge pull request #74 from saddam213/TensorRT
Add TensorRT ExecutionProvider
2 parents f4fbe5a + 59a54e0 commit 9b28719

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

OnnxStack.Core/Config/ExecutionProvider.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public enum ExecutionProvider
66
Cuda = 1,
77
Cpu = 2,
88
CoreML = 3,
9-
OpenVino = 4
9+
OpenVino = 4,
10+
TensorRT = 5
1011
}
1112
}

OnnxStack.Core/Extensions/Extensions.cs

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public static SessionOptions GetSessionOptions(this OnnxModelConfig configuratio
5151
};
5252
sessionOptions.AppendExecutionProvider_OpenVINO(deviceId);
5353
return sessionOptions;
54+
case ExecutionProvider.TensorRT:
55+
sessionOptions.AppendExecutionProvider_Tensorrt(configuration.DeviceId.Value);
56+
return sessionOptions;
5457
}
5558
}
5659

0 commit comments

Comments
 (0)