in optimum/amd/brevitas/export.py [0:0]
def create_nodes(graph: Graph, op: str, name: str, inputs: List[str], outputs: List[str], **kwargs):
newnode = onnx.helper.make_node(op, inputs, outputs, name=name, **kwargs)
newnode = create_node(newnode)
newnode.input = inputs
newnode.output = outputs
for i in inputs:
if i in graph.consumedby:
graph.consumedby[i].append(name)
if i in graph.producedby.keys():
newnode.prevnodes.append(graph.producedby[i])
for o in outputs:
graph.producedby[o] = [name]
if o in graph.consumedby.keys():
newnode.nextnodes.append(graph.consumedby[o])
graph.nodemap[name] = newnode
graph.tensormap[name] = Tensor(name)
return graph