Skip to content

Commit fbc4107

Browse files
committed
Remove mentions of dense_resource_implementation
1 parent 10f648c commit fbc4107

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

hls4ml/backends/vivado/vivado_backend.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ def init_dense(self, layer):
292292
else:
293293
layer.set_attr('strategy', 'latency')
294294
layer.set_attr('index_t', NamedType(f'layer{layer.index}_index', index_t))
295-
layer.set_attr('dense_resource_implementation', layer.model.config.get_dense_resource_implementation(layer).lower())
296295

297296
# TODO consolidate these functions into a single `init_conv`
298297
@layer_optimizer(Conv1D)

hls4ml/model/graph.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ def __init__(self, config):
4343
self.layer_type_conv_implementation = {}
4444
self.layer_name_conv_implementation = {}
4545

46-
self.model_dense_resource_implementation = 'Standard'
47-
self.layer_type_dense_resource_implementation = {}
48-
self.layer_name_dense_resource_implementation = {}
49-
5046
self.model_compression = False
5147
self.layer_type_compression = {}
5248
self.layer_name_compression = {}
@@ -190,17 +186,6 @@ def get_conv_implementation(self, layer):
190186

191187
return conv_implementation
192188

193-
def get_dense_resource_implementation(self, layer):
194-
dense_resource_implementation = self.layer_name_dense_resource_implementation.get(layer.name.lower())
195-
if dense_resource_implementation is None:
196-
dense_resource_implementation = self.layer_type_dense_resource_implementation.get(
197-
layer.__class__.__name__.lower()
198-
)
199-
if dense_resource_implementation is None:
200-
dense_resource_implementation = self.model_dense_resource_implementation
201-
202-
return dense_resource_implementation
203-
204189
def is_resource_strategy(self, layer):
205190
return self.get_strategy(layer).lower() == 'resource'
206191

@@ -280,7 +265,6 @@ def _parse_hls_config(self):
280265
self.model_rf = model_cfg.get('ReuseFactor')
281266
self.model_targ_cycles = model_cfg.get('TargetCycles')
282267
self.model_conv_implementation = model_cfg.get('ConvImplementation', 'LineBuffer')
283-
self.model_dense_resource_implementation = model_cfg.get('DenseResourceImplementation', 'Standard')
284268
self.model_strategy = model_cfg.get('Strategy', 'Latency')
285269
self.model_compression = bool(model_cfg.get('Compression', 0))
286270
self.pipeline_style = model_cfg.get('PipelineStyle', 'pipeline')
@@ -311,10 +295,6 @@ def _parse_hls_config(self):
311295
if conv_implementation is not None:
312296
self.layer_type_conv_implementation[layer_type.lower()] = conv_implementation
313297

314-
dense_resource_implementation = layer_cfg.get('DenseResourceImplementation')
315-
if conv_implementation is not None:
316-
self.layer_type_dense_resource_implementation[layer_type.lower()] = dense_resource_implementation
317-
318298
compression = layer_cfg.get('Compression')
319299
if compression is not None:
320300
self.layer_type_compression[layer_type.lower()] = bool(compression)

0 commit comments

Comments
 (0)