Skip to content
Snippets Groups Projects
Commit ea776a18 authored by auphelia's avatar auphelia
Browse files

[Test] Set pe, simd and fifo depth in tfc w1a1 test for throughput test -> rename file

parent 36c354bf
No related branches found
No related tags found
No related merge requests found
......@@ -133,23 +133,37 @@ def test_end2end_tfc_w1a1_fold_and_tlastmarker():
fc1w = getCustomOp(fc_layers[1])
fc2w = getCustomOp(fc_layers[2])
fc3w = getCustomOp(fc_layers[3])
fc0w.set_nodeattr("inFIFODepth", 50)
fc0w.set_nodeattr("SIMD", 16)
fc0w.set_nodeattr("inFIFODepth", 256)
fc0w.set_nodeattr("SIMD", 196)
fc0w.set_nodeattr("PE", 16)
fc0w.set_nodeattr("outFIFODepth", 4)
fc1w.set_nodeattr("SIMD", 8)
fc1w.set_nodeattr("PE", 8)
fc1w.set_nodeattr("outFIFODepth", 4)
fc0w.set_nodeattr("outFIFODepth", 64)
fc1w.set_nodeattr("SIMD", 16)
fc1w.set_nodeattr("PE", 16)
fc1w.set_nodeattr("outFIFODepth", 64)
fc2w.set_nodeattr("SIMD", 16)
fc2w.set_nodeattr("PE", 16)
fc2w.set_nodeattr("outFIFODepth", 4)
fc2w.set_nodeattr("outFIFODepth", 64)
fc3w.set_nodeattr("SIMD", 16)
fc3w.set_nodeattr("PE", 10)
fc3w.set_nodeattr("outFIFODepth", 50)
fc3w.set_nodeattr("outFIFODepth", 10)
model = model.transform(InsertDWC())
model = model.transform(InsertFIFO())
model = model.transform(InsertTLastMarker())
model = model.transform(GiveUniqueNodeNames())
fifos = []
for n in model.graph.node:
if n.op_type == "StreamingFIFO":
fifos.append(n)
fifo0 = getCustomOp(fifos[0])
fifo1 = getCustomOp(fifos[1])
fifo2 = getCustomOp(fifos[2])
fifo3 = getCustomOp(fifos[3])
fifo4 = getCustomOp(fifos[4])
fifo0.set_nodeattr("depth", 256)
fifo1.set_nodeattr("depth", 64)
fifo2.set_nodeattr("depth", 64)
fifo3.set_nodeattr("depth", 64)
fifo4.set_nodeattr("depth", 10)
model = model.transform(AnnotateResources("estimate"))
model.save(build_dir + "/end2end_tfc_w1a1_folded.onnx")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment