Create an empty array given shape, type and device. @param shape The shape of the array. @param dtype The data type of the array. @param dev The device of the array. @return The array tvm supported.
(long[] shape, TVMType dtype, Device dev)
| 360 | * @return The array tvm supported. |
| 361 | */ |
| 362 | public static Tensor empty(long[] shape, TVMType dtype, Device dev) { |
| 363 | Base.RefLong refHandle = new Base.RefLong(); |
| 364 | Base.checkCall(Base._LIB.tvmTensorEmpty( |
| 365 | shape, dtype.typeCode, dtype.bits, dtype.lanes, dev.deviceType, dev.deviceId, refHandle)); |
| 366 | return new Tensor(refHandle.value, false, dtype, dev); |
| 367 | } |
| 368 | |
| 369 | /** |
| 370 | * Create an empty array on cpu given shape and type. |