refactor: shorten execution_providers

frankly, working on documentation has made me tired of typing out `execution_providers` and `ExecutionProvider` all the time
This commit is contained in:
Carson M.
2025-11-14 23:57:09 -06:00
parent 47e5667d6e
commit 3b408b1b44
43 changed files with 508 additions and 435 deletions

View File

@@ -1,6 +1,6 @@
use ort::{
adapter::Adapter,
execution_providers::CPUExecutionProvider,
ep,
memory::{AllocationDevice, Allocator, AllocatorType, MemoryInfo, MemoryType},
operator::{
Operator, OperatorDomain,
@@ -77,7 +77,7 @@ impl Operator for CustomOpTwo {
}
fn main() -> ort::Result<()> {
ort::init().with_execution_providers([CPUExecutionProvider::default().build()]).commit();
ort::init().with_execution_providers([ep::CPU::default().build()]).commit();
let mut session = Session::builder()?
.with_operators(OperatorDomain::new("test.customop")?.add(CustomOpOne)?.add(CustomOpTwo)?)?