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

Method entry_a

tests/python/relax/test_transform_allocate_workspace.py:123–137  ·  view source on GitHub ↗
(
        q: R.Tensor((32, 8, 16, 8), dtype="float16"),
        k: R.Tensor((32, 8, 16, 8), dtype="float16"),
        v: R.Tensor((32, 8, 16, 8), dtype="float16"),
    )

Source from the content-addressed store, hash-verified

121
122 @R.function
123 def entry_a(
124 q: R.Tensor((32, 8, 16, 8), dtype="float16"),
125 k: R.Tensor((32, 8, 16, 8), dtype="float16"),
126 v: R.Tensor((32, 8, 16, 8), dtype="float16"),
127 ) -> R.Tensor((32, 8, 16, 8), dtype="float16"):
128 cls = Expected
129 with R.dataflow():
130 workspace_main: R.Tensor((65536,), dtype="uint8") = R.builtin.alloc_tensor(
131 R.shape([65536]), R.dtype("uint8"), R.prim_value(0)
132 )
133 gv: R.Tensor((32, 8, 16, 8), dtype="float16") = cls.fused_relax_nn_attention_cutlass1(
134 q, k, v, workspace_main
135 )
136 R.output(gv)
137 return gv
138
139 @R.function
140 def entry_b(

Callers

nothing calls this directly

Calls 6

TensorMethod · 0.80
dataflowMethod · 0.80
outputMethod · 0.80
shapeMethod · 0.45
dtypeMethod · 0.45

Tested by

no test coverage detected