MCPcopy Index your code
hub / github.com/apache/tvm / asByteArray

Method asByteArray

jvm/core/src/main/java/org/apache/tvm/Tensor.java:309–315  ·  view source on GitHub ↗

Return a copied flat java array of current array (row-major). The Tensor dtype must be int8 @return A copy of array content.

()

Source from the content-addressed store, hash-verified

307 * @return A copy of array content.
308 */
309 public byte[] asByteArray() {
310 if (dtype.typeCode != TVMType.INT || dtype.bits != 8) {
311 throw new IllegalArgumentException(
312 "Cannot set convert to byte[] for " + dtype.toString() + " array");
313 }
314 return internal();
315 }
316
317 /**
318 * Return a copied internal byte array of current array (row-major).

Callers 1

test_from_int8Method · 0.95

Calls 2

internalMethod · 0.95
toStringMethod · 0.45

Tested by 1

test_from_int8Method · 0.76