From 493f7b29a4e543ae32ca642f9b6e90f4c2cd5fab Mon Sep 17 00:00:00 2001
From: Yaman Umuroglu <maltanar@gmail.com>
Date: Tue, 4 Aug 2020 12:45:05 +0200
Subject: [PATCH] [Core] only pass relevant inputs to SDP

---
 src/finn/core/onnx_exec.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/finn/core/onnx_exec.py b/src/finn/core/onnx_exec.py
index 7c3123cd5..cee9b703a 100644
--- a/src/finn/core/onnx_exec.py
+++ b/src/finn/core/onnx_exec.py
@@ -51,7 +51,8 @@ def execute_node(node, context, graph):
     if node.op_type == "StreamingDataflowPartition":
         sdp_node = getCustomOp(node)
         model = ModelWrapper(sdp_node.get_nodeattr("model"))
-        ret = execute_onnx(model, context, True)
+        inp_ctx = dict(filter(lambda x: x[0] in node.input, context.items()))
+        ret = execute_onnx(model, inp_ctx, False)
         context.update(ret)
     else:
         if node.domain == "finn":
-- 
GitLab