@@ -100,11 +100,11 @@ integrated MLIP cn10ka processor, using only 4 tiles in the block.
100100 python3 - m tvm.driver.tvmc compile -- target= " mrvl, llvm" \
101101 -- target- llvm- mtriple= aarch64- linux- gnu -- target- llvm- mcpu= neoverse- n2 \
102102 -- target- mrvl- num_tiles= 4 \
103+ -- target- mrvl- mattr= " hw -quantize=fp16 -wb_pin_ocm=1" \
103104 -- cross- compiler aarch64- linux- gnu- gcc \
104105 -- output model.tar \
105106 mnist- 12. onnx
106107
107- The runtime support for hardware acceleration is a WIP, it will be added in future PR.
108108
109109 3.3. TVMC Compiler: mrvl specific Command Line Options
110110------------------------------------------------------
@@ -125,7 +125,7 @@ The runtime support for hardware acceleration is a WIP, it will be added in futu
125125 Maximum number of tiles that may be used, possible values = {1,2,4,8}, defaults to 8
126126
127127* mattr:
128- Attributes for mrvl; possible values = {quantize, wb_pin_ocm}
128+ Attributes for mrvl; possible values = {quantize, wb_pin_ocm, run_mode }
129129
130130 mattr specifies the data type, code generation options and optimizations.
131131
@@ -141,15 +141,23 @@ The runtime support for hardware acceleration is a WIP, it will be added in futu
141141 Optimize runtime by preloading a model's weights and bias into
142142 the on chip memory. Possible values = {0, 1}. Default is 0 (no preload)
143143
144- 4. Compile ONNX model for Simulator + LLVM / x86_64 target
145- ----------------------------------------------------------
144+ **3. run_mode **
145+
146+ Specify whether to compile for the simulator or for the target hardware (Octeon).
147+ Possible values = {sim, hw}. Default is sim (software simulator).
148+
149+ 4. Compile ONNX model using the TVMC flow
150+ -----------------------------------------
146151
147152In the TVMC mrvl flow, the model is partitioned into Marvell and LLVM regions.
148153Building each partitioned Marvell subgraph generates serialized nodes.json and
149154const.json. Partitioned nodes.json is the representation of the model graph which is
150155suitable for the Marvell compiler (mrvl-tmlc). The compiler compiles the model graph to
151156generate the model binary with MLIP instructions.
152157
158+ 4.1 Compile and Run ONNX model for Simulator + LLVM / x86_64 target
159+ --------------------------------------------------------------------
160+
153161**Model Compilation for Simulator + LLVM / x86_64 target **
154162
155163.. code :: python
@@ -165,6 +173,23 @@ Generated model binary is simulated using Marvell's MLIP Simulator(mrvl-mlsim).
165173
166174 python3 - m tvm.driver.tvmc run -- inputs infer.npz -- outputs predict.npz model.tar -- number= 0
167175
176+ 4.2 Compile and Run ONNX model for Octeon target
177+ ----------------------------------------------------------
178+
179+ **Model Compilation for Octeon target **
180+
181+ Please refer to section 3.2 for the example command line.
182+
183+ **Run TVM models on the Octeon Target **
184+
185+ The cross compiled binary can be run on the target hardware using the tvmc run command.
186+ Alternatively, the RPC flow enables remote execution on the target device from your
187+ local machine: https://tvm.apache.org/docs/how_to/tutorials/cross_compilation_and_rpc.html
188+
189+ .. code :: python
190+
191+ python3 - m tvm.driver.tvmc run -- inputs infer.npz -- outputs predict.npz model.tar
192+
168193 5. Compiling a model using Python APIs
169194--------------------------------------
170195
0 commit comments