tvm_ffi/
lib.rs

1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19pub mod any;
20pub mod collections;
21pub mod derive;
22pub mod device;
23pub mod dtype;
24pub mod error;
25pub mod extra;
26pub mod function;
27pub mod function_internal;
28pub mod macros;
29pub mod object;
30pub mod string;
31pub mod type_traits;
32pub use tvm_ffi_sys;
33
34pub use crate::any::{Any, AnyView};
35pub use crate::collections::shape::Shape;
36pub use crate::collections::tensor::{CPUNDAlloc, NDAllocator, Tensor};
37pub use crate::device::{current_stream, with_stream};
38pub use crate::dtype::DLDataTypeExt;
39pub use crate::error::{Error, ErrorKind, Result};
40pub use crate::error::{
41    ATTRIBUTE_ERROR, INDEX_ERROR, KEY_ERROR, RUNTIME_ERROR, TYPE_ERROR, VALUE_ERROR,
42};
43pub use crate::extra::module::Module;
44pub use crate::function::Function;
45pub use crate::object::{Object, ObjectArc, ObjectCore, ObjectCoreWithExtraItems, ObjectRefCore};
46pub use crate::string::{Bytes, String};
47pub use crate::type_traits::AnyCompatible;
48
49pub use tvm_ffi_sys::TVMFFITypeIndex as TypeIndex;
50pub use tvm_ffi_sys::{
51    DLDataType, DLDataTypeCode, DLDevice, DLDeviceType, TVMFFIAny, TVMFFIObject, TVMFFIStreamHandle,
52};