mirror of
https://github.com/pykeio/ort
synced 2026-04-25 16:34:55 +02:00
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:
@@ -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)?)?
|
||||
|
||||
Reference in New Issue
Block a user