Skip to content

Commit ec21316

Browse files
committed
Fixed formatting
1 parent c398c66 commit ec21316

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

Deeploy/CommonExtensions/NetworkDeployers/SignPropDeployer.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ def __init__(self,
2525
inputOffsets: Dict[str, int] = {},
2626
n_cores: int = 8):
2727
super().__init__(
28-
graph=graph,
29-
deploymentPlatform=deploymentPlatform,
30-
inputTypes=inputTypes,
31-
loweringOptimizer=loweringOptimizer,
32-
scheduler=scheduler,
33-
name=name,
34-
default_channels_first=default_channels_first,
35-
deeployStateDir=deeployStateDir,
36-
n_cores=n_cores,
37-
)
28+
graph = graph,
29+
deploymentPlatform = deploymentPlatform,
30+
inputTypes = inputTypes,
31+
loweringOptimizer = loweringOptimizer,
32+
scheduler = scheduler,
33+
name = name,
34+
default_channels_first = default_channels_first,
35+
deeployStateDir = deeployStateDir,
36+
n_cores = n_cores,
37+
)
3838

3939
if inputOffsets == {}:
4040
for key in inputTypes.keys():

Deeploy/Targets/PULPOpen/TileConstraints/DWConvTileConstraint.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def addGeometricalConstraint(tilerModel: TilerModel, parseDict: Dict, ctxt: Netw
245245

246246
# ===== GET NECESSARY INFORMATION =====
247247
# Get to-be-tiled tensor's buffers
248-
inputBufferName = parseDict['data_in']
248+
inputBufferName = parseDict['data_in']
249249
outputBufferName = parseDict['data_out']
250250

251251
weightBufferName = parseDict['weight']
@@ -307,8 +307,10 @@ def addGeometricalConstraint(tilerModel: TilerModel, parseDict: Dict, ctxt: Netw
307307
# Add constraint for input width and height sizes match
308308
# (Depends on output height and width, kernel size, padding, dilations, and strides.
309309
# For more information on the connections, see ONNX and/or Torch Conv2D documentation).
310-
tilerModel.addConstraint(outputHeightVar == (((inputHeightVar + pads[0] + pads[2] - dilations[0] * (weightHeightVar - 1) -1) // strides[0]) + 1))
311-
tilerModel.addConstraint(outputWidthVar == (((inputWidthVar + pads[1] + pads[3] - dilations[1] * (weightWidthVar - 1) -1) // strides[1]) + 1))
310+
tilerModel.addConstraint(outputHeightVar == (((inputHeightVar + pads[0] + pads[2] - dilations[0] *
311+
(weightHeightVar - 1) - 1) // strides[0]) + 1))
312+
tilerModel.addConstraint(outputWidthVar == (((inputWidthVar + pads[1] + pads[3] - dilations[1] *
313+
(weightWidthVar - 1) - 1) // strides[1]) + 1))
312314

313315
# Add constraint for input channel size match
314316
# (Depends on weight output channel and conv grouping)
@@ -335,7 +337,7 @@ def addGeometricalConstraint(tilerModel: TilerModel, parseDict: Dict, ctxt: Netw
335337
def addPolicyConstraint(tilerModel: TilerModel, parseDict: Dict, ctxt: NetworkContext) -> TilerModel:
336338
# ===== GET NECESSARY INFORMATION =====
337339
# Get to-be-tiled tensor's buffers
338-
inputBufferName = parseDict['data_in']
340+
inputBufferName = parseDict['data_in']
339341
outputBufferName = parseDict['data_out']
340342

341343
weightBufferName = parseDict['weight']

Deeploy/Targets/PULPOpen/TileConstraints/MatMulTileConstraint.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def addGeometricalConstraint(tilerModel: TilerModel, parseDict: Dict, ctxt: Netw
4747
dimIdx = (tensorsShapeLenB - 1) - parseDict['transB'])
4848

4949
# Output dims
50-
outBatchDimsVars = [tilerModel.getTensorDimVar(tensorName=outputBuffer.name, dimIdx=idx) for idx in range(tensorsShapeLenOutput - 2)]
5150
outputMatrixFirstDimVar = tilerModel.getTensorDimVar(tensorName = outputBuffer.name,
5251
dimIdx = (tensorsShapeLenOutput - 2))
5352
outputMatrixSecondDimVar = tilerModel.getTensorDimVar(tensorName = outputBuffer.name,

0 commit comments

Comments
 (0)