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

Method makeShapeTuple

web/src/runtime.ts:1704–1713  ·  view source on GitHub ↗

* Create a shape tuple to pass to runtime. * @param shape The shape . * @returns The created shape tuple.

(shape: Array<number>)

Source from the content-addressed store, hash-verified

1702 * @returns The created shape tuple.
1703 */
1704 makeShapeTuple(shape: Array<number>): TVMObject {
1705 const key = CacheState.computeShapeKey(shape);
1706 return this.cacheState.shapeCache.get(key, () => {
1707 const shapeArray = shape.map((value) => new Scalar(value, "int"));
1708 const tuple = this.ctx.makeShapeTuple(...shapeArray);
1709 // Detach from scope so the cached object survives across scopes.
1710 this.detachFromCurrentScope(tuple);
1711 return tuple;
1712 }) as TVMObject;
1713 }
1714 /**
1715 * Get type index from type key.
1716 * @param typeKey The type key.

Callers 2

emptyMethod · 0.95
viewMethod · 0.80

Calls 3

computeShapeKeyMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected