impl<'a> From<&'a TVMContext> for DLContext {
fn from(ctx: &'a TVMContext) -> Self {
Self {
- device_type: ctx.device_type as u32,
+ device_type: ctx.device_type as i32,
device_id: ctx.device_id as i32,
}
}
//! This crate contains the refactored basic components required
//! for `runtime` and `frontend` TVM crates.
-#![feature(box_syntax, type_alias_enum_variants, trait_alias)]
+#![feature(box_syntax, trait_alias)]
#[macro_use]
extern crate failure;
use $name::*;
#[allow(non_upper_case_globals)]
unsafe {
- match type_code {
+ match type_code as i32 {
DLDataTypeCode_kDLInt => Int($value.v_int64),
DLDataTypeCode_kDLUInt => UInt($value.v_int64),
DLDataTypeCode_kDLFloat => Float($value.v_float64),
//!
//! Checkout the `examples` repository for more details.
-#![feature(box_syntax, type_alias_enum_variants)]
+#![feature(box_syntax)]
#[macro_use]
extern crate failure;
* under the License.
*/
-#![feature(bind_by_move_pattern_guards, proc_macro_span)]
+#![feature(proc_macro_span)]
extern crate proc_macro;