Skip to content
Snippets Groups Projects
Commit 46257f31 authored by Yaman Umuroglu's avatar Yaman Umuroglu Committed by Yaman Umuroglu
Browse files

[DynConv] make get_dynamic_config return defaults with None params

parent 6e91fcd6
No related branches found
No related tags found
No related merge requests found
......@@ -847,13 +847,15 @@ class ConvolutionInputGenerator_rtl(HLSCustomOp):
intf_names["axilite"] = ["s_axilite"]
return intf_names
def get_dynamic_config(self, ifm_dim, stride=None, dilation=None):
def get_dynamic_config(self, ifm_dim=None, stride=None, dilation=None):
"""Returns a configuration dict to re-configure FM dimension during
runtime. Stride and dilation can also be changed. Certain restrictions
apply (e.g. component must be synthesized for largest buffer size)."""
# NOTE: For better driver integration, this functionality could be packaged
# as a standalone function in the future
if ifm_dim is None:
ifm_dim = self.get_nodeattr("IFMDim")
k = self.get_nodeattr("ConvKernelDim")
if stride is None:
stride = self.get_nodeattr("Stride")
......
......@@ -271,10 +271,14 @@ class FMPadding_rtl(HLSCustomOp):
}
return code_gen_dict
def get_dynamic_config(self, ifm_dims, pads):
def get_dynamic_config(self, ifm_dims=None, pads=None):
"""Returns a configuration dict to re-configure FM dimension and
padding amounts during runtime."""
if ifm_dims is None:
ifm_dims = self.get_nodeattr("ImgDim")
if pads is None:
pads = self.get_nodeattr("Padding")
chans = self.get_nodeattr("NumChannels")
simd = self.get_nodeattr("SIMD")
idt = self.get_input_datatype()
......
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