Skip to content

Commit

Permalink
Rust: add constructor i64 IntImm
Browse files Browse the repository at this point in the history
  • Loading branch information
cgerum committed Nov 9, 2023
1 parent ad978bc commit 2b598a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rust/tvm/src/ir/tir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ impl From<i32> for IntImm {
}
}

impl From<i64> for IntImm {
fn from(i : i64) -> IntImm {
IntImm::new(DataType::int(64, 1), i)
}
}

impl From<i32> for PrimExpr {
fn from(i: i32) -> PrimExpr {
IntImm::from(i).upcast()
Expand Down

0 comments on commit 2b598a9

Please sign in to comment.