Skip to content

Commit 763b464

Browse files
committed
training-platform core: canonicalise SoftmaxCrossEntropyLoss to 2 outputs
Two fixes for CI regressions on PR #182: 1. SoftmaxCrossEntropyLoss: canonical form is now 2 outputs (loss + log_prob). The previous design carried both a legacy 1-output form and a new 2-output 'dual output' form side by side, which tripped Deeploy's root-layer backtracking: Layer.parse() commits to the first mapper whose parser succeeds, and if that mapper's bindings all later fail typeCheck, the root-layer backtracker raises instead of trying the next mapper. That broke the existing upstream Tests/Kernels/FP32/Softmax/CrossEntropy. Fix: collapse everything to a single 2-output path. SoftmaxCrossEntropy LossParser now requires exactly 2 outputs, the SCE template is the former 'referenceDualOutputTemplate' (loss + log_prob), the PULPOpen binding uses 2-output pointer types, and the tile constraint contains the loss patching logic that previously lived in SoftmaxCrossEntropyLossDualOutputTileConstraint (now deleted). SoftmaxCrossEntropyGradTileConstraint overrides dataLossName to '' so it falls straight through to the base-class single-output wrapper. The upstream Tests/Kernels/FP32/Softmax/CrossEntropy ONNX is regenerated with the canonical 2-output signature and its outputs.npz is updated with the computed scalar loss. 2. TilingExtension.TilerExtension: drop the 4-byte MiniMalloc size alignment that was added in the training branch to work around a Siracusa L3 DMA corner case. That change makes Snitch's tight-fit 5 kB Kernels/Integer/Add/Large test overflow L1 because the rounded-up per-buffer sizes no longer fit. For MLP core the alignment is not needed. The alias-skip logic (skip zero-sized in-place alias outputs from the MiniMalloc CSV and resolve their addrSpace from the alias target after solving) is kept. Verified locally: - Tests/Kernels/FP32/Softmax/CrossEntropy (upstream) PASSED - Tests/Kernels/Integer/Add/Large (snitch tiled, L1=5 kB) PASSED - deeployTrainingRunner_siracusa.py -t simplemlp_train PASSED - deeployTrainingRunner_tiled_siracusa.py -t simplemlp_train PASSED
1 parent 284f145 commit 763b464

10 files changed

Lines changed: 116 additions & 150 deletions

File tree

Deeploy/Targets/Generic/Parsers.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,16 +2611,18 @@ def parseNodeCtxt(self,
26112611

26122612

26132613
class SoftmaxCrossEntropyLossParser(NodeParser):
2614+
"""SoftmaxCrossEntropyLoss parser.
2615+
2616+
The canonical form has two outputs: a scalar mean cross-entropy loss and
2617+
a per-sample log_prob tensor, matching the signature emitted by ONNX
2618+
Runtime when exporting training graphs.
2619+
"""
26142620

26152621
def __init__(self):
26162622
super().__init__()
26172623

26182624
def parseNode(self, node: gs.Node) -> bool:
2619-
2620-
# Accept 1 output (log_prob only) or 2 outputs (loss + log_prob)
2621-
ret = all([len(node.inputs) == 2, len(node.outputs) in (1, 2)])
2622-
2623-
return ret
2625+
return all([len(node.inputs) == 2, len(node.outputs) == 2])
26242626

26252627
def parseNodeCtxt(self,
26262628
ctxt: NetworkContext,
@@ -2629,17 +2631,13 @@ def parseNodeCtxt(self,
26292631

26302632
logits = ctxt.lookup(node.inputs[0].name)
26312633
labels = ctxt.lookup(node.inputs[1].name)
2632-
if len(node.outputs) == 2:
2633-
# Dual-output: outputs[0]=loss (scalar), outputs[1]=log_prob
2634-
loss = ctxt.lookup(node.outputs[0].name)
2635-
log_prob = ctxt.lookup(node.outputs[1].name)
2636-
self.operatorRepresentation['loss'] = loss.name
2637-
else:
2638-
# Single-output (legacy): outputs[0]=log_prob
2639-
log_prob = ctxt.lookup(node.outputs[0].name)
2640-
self.operatorRepresentation['loss'] = ''
2634+
# outputs[0] = loss (0-d scalar, shape [1] after Deeploy normalisation)
2635+
# outputs[1] = log_prob tensor
2636+
loss = ctxt.lookup(node.outputs[0].name)
2637+
log_prob = ctxt.lookup(node.outputs[1].name)
26412638
self.operatorRepresentation['logits'] = logits.name
26422639
self.operatorRepresentation['labels'] = labels.name
2640+
self.operatorRepresentation['loss'] = loss.name
26432641
self.operatorRepresentation['log_prob'] = log_prob.name
26442642
self.operatorRepresentation['batch'] = logits.shape[0]
26452643
self.operatorRepresentation['num_classes'] = logits.shape[1]

Deeploy/Targets/Generic/TypeCheckers.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -574,12 +574,6 @@ class SoftmaxCrossEntropyLossChecker(SignPropTypeChecker):
574574
def __init__(self, input_types: Sequence[Type[Pointer]], output_types: Sequence[Type[Pointer]]):
575575
super().__init__(input_types, output_types)
576576

577-
def checkOutputType(self, inputs: List[VariableBuffer], operatorRepresentation: OperatorRepresentation) -> bool:
578-
# The parser sets 'loss' to a non-empty string for 2-output nodes, '' for 1-output.
579-
# Use this to determine the actual output count and match it against this binding.
580-
actual_num_outputs = 2 if operatorRepresentation.get('loss', '') != '' else 1
581-
return actual_num_outputs == len(self.output_types)
582-
583577
def _inferNumLevels(self, inputs: List[VariableBuffer],
584578
operatorRepresentation: OperatorRepresentation) -> Optional[List[int]]:
585579

Deeploy/Targets/PULPOpen/Bindings.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,16 +353,10 @@
353353
]
354354

355355
PULPSoftmaxCrossEntropyLossBindings = [
356-
NodeBinding(
357-
SoftmaxCrossEntropyLossChecker([PointerClass(float32_t), PointerClass(type)], [PointerClass(float32_t)]),
358-
SoftmaxCrossEntropyLossTemplate.referenceTemplate, ForkTransformer) for type in IntegerDataTypes
359-
]
360-
361-
PULPSoftmaxCrossEntropyLossDualOutputBindings = [
362356
NodeBinding(
363357
SoftmaxCrossEntropyLossChecker([PointerClass(float32_t), PointerClass(type)],
364358
[PointerClass(float32_t), PointerClass(float32_t)]),
365-
SoftmaxCrossEntropyLossTemplate.referenceDualOutputTemplate, ForkTransformer) for type in IntegerDataTypes
359+
SoftmaxCrossEntropyLossTemplate.referenceTemplate, ForkTransformer) for type in IntegerDataTypes
366360
]
367361

368362
PULPSoftmaxCrossEntropyLossGradBindings = [

Deeploy/Targets/PULPOpen/Platform.py

Lines changed: 44 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@
4747
PULPRQSConv1DTilingReadyBindings, PULPRQSConv2DTilingReadyBindings, PULPRQSDWConv2DTilingReadyBindings, \
4848
PULPRQSGEMMTilingReadyBindings, PULPRQSiHardswishTilingReadyBindings, PULPRQSMatrixVecTilingReadyBindings, \
4949
PULPRQSTallGEMMTilingReadyBindings, PULPRQSTilingReadyBindings, PULPSGDTilingReadyBindings, \
50-
PULPSliceTilingReadyBindings, PULPSoftmaxCrossEntropyDualOutputTilingReadyBindings, \
51-
PULPSoftmaxCrossEntropyGradTilingReadyBindings, PULPSoftmaxCrossEntropyTilingReadyBindings, \
52-
PULPSoftmaxGradTilingReadyBindings, PULPSoftmaxTilingReadyBindings, PULPTransposeTilingReadyBindings, \
53-
PULPUniformRQSTilingReadyBindings
50+
PULPSliceTilingReadyBindings, PULPSoftmaxCrossEntropyGradTilingReadyBindings, \
51+
PULPSoftmaxCrossEntropyTilingReadyBindings, PULPSoftmaxGradTilingReadyBindings, PULPSoftmaxTilingReadyBindings, \
52+
PULPTransposeTilingReadyBindings, PULPUniformRQSTilingReadyBindings
5453
from Deeploy.Targets.PULPOpen.TopologyOptimizationPasses.Passes import PULPAddRequantMergePass, \
5554
PULPConvRequantMergePass, PULPGEMMRequantMergePass, PULPMatMulRequantMergePass
5655

@@ -106,8 +105,6 @@
106105
iHardswishMapper = NodeMapper(iHardswishParser(), PULPiHardswishTilingReadyBindings)
107106
RQSiHardswishMapper = NodeMapper(RQSiHardswishParser(), PULPRQSiHardswishTilingReadyBindings)
108107
SoftmaxCrossEntropyLossMapper = NodeMapper(SoftmaxCrossEntropyLossParser(), PULPSoftmaxCrossEntropyTilingReadyBindings)
109-
SoftmaxCrossEntropyLossDualOutputMapper = NodeMapper(SoftmaxCrossEntropyLossParser(),
110-
PULPSoftmaxCrossEntropyDualOutputTilingReadyBindings)
111108
SoftmaxCrossEntropyLossGradMapper = NodeMapper(SoftmaxCrossEntropyLossGradParser(),
112109
PULPSoftmaxCrossEntropyGradTilingReadyBindings)
113110
SGDMapper = NodeMapper(SGDParser(), PULPSGDTilingReadyBindings)
@@ -116,88 +113,47 @@
116113
DequantMapper = NodeMapper(DequantParser(), BasicDequantBindings)
117114
GEMMDequantMapper = NodeMapper(PULPGEMMParser(), BasicGEMMBindings)
118115
PULPMapping = {
119-
'Conv':
120-
ConvLayer([FPConv2DMapper, FPDWConv2DMapper]),
121-
'RequantizedConv':
122-
PULPRQSConvLayer([Conv2DMapper, DWConv2DMapper, Conv1DMapper, DWConv1DMapper]),
123-
'RequantizedGemm':
124-
PULPRQSGEMMLayer([MatrixVecMapper, TallGEMMMapper, GEMMMapper]),
125-
'Gemm':
126-
GEMMLayer([FloatGEMMMapper, GEMMDequantMapper]),
127-
'Gelu':
128-
GELULayer([GELUMapper]),
129-
'GeluGrad':
130-
GELUGradLayer([GELUGradMapper]),
131-
'LayerNormalization':
132-
LayerNormLayer([LayerNormMapper]),
133-
'LayerNormalizationGrad':
134-
LayerNormGradLayer([LayerNormGradMapper]),
135-
'MaxPool':
136-
MaxPoolLayer([MaxPool1DMapper, MaxPool2DMapper]),
137-
'RequantizediGELU':
138-
RQSiGELULayer([RQGELU_int8_Mapper]),
139-
'RQIntegerDiv':
140-
RQIntegerDivLayer([RQIntegerDivMapper]),
141-
'MatMul':
142-
MatMulLayer([MatMulMapper]),
143-
'IntegerMean':
144-
ReduceMeanLayer([ReduceMeanMapper]),
145-
'iSoftmax':
146-
SoftmaxLayer([Softmax_int8_Mapper]),
147-
'Softmax':
148-
SoftmaxLayer([SoftmaxMapper]),
149-
'ReduceMean':
150-
ReduceMeanLayer([ReduceMeanMapper]),
151-
'ReduceSum':
152-
ReduceSumLayer([ReduceSumMapper]),
153-
'RequantShift':
154-
RequantShiftLayer([UniformRequantShiftMapper, RequantShiftMapper]),
155-
'Add':
156-
AddLayer([AddMapper]),
157-
'Flatten':
158-
ReshapeLayer([FlattenMapper]),
159-
'Gather':
160-
GatherLayer([GatherMapper]),
161-
'Mul':
162-
MulLayer([MulMapper]),
163-
'Pad':
164-
PadLayer([Pad1DMapper, Pad2DMapper]),
165-
'Relu':
166-
ReluLayer([ReluMapper]),
167-
'Reshape':
168-
ReshapeLayer([ReshapeMapper]),
169-
'Squeeze':
170-
ReshapeLayer([UnsqueezeMapper]),
171-
'Transpose':
172-
TransposeLayer([TransposeMapper]),
173-
'Unsqueeze':
174-
ReshapeLayer([UnsqueezeMapper]),
175-
'Slice':
176-
SliceLayer([SliceMapper, DMASliceMapper]),
177-
'RequantizedAdd':
178-
AddLayer([RQAddMapper]),
179-
'Concat':
180-
ConcatLayer([ConcatMapper]),
181-
'iRMSNorm':
182-
iRMSNormLayer([iRMSNormMapper]),
183-
'iHardswish':
184-
iHardswishLayer([iHardswishMapper]),
185-
'RequantizediHardswish':
186-
RQSiHardswishLayer([RQSiHardswishMapper]),
187-
'Quant':
188-
QuantLayer([QuantMapper]),
189-
'Dequant':
190-
QuantLayer([DequantMapper]),
191-
'SoftmaxGrad':
192-
SoftmaxGradLayer([SoftmaxGradMapper]),
193-
'SoftmaxCrossEntropyLoss':
194-
SoftmaxCrossEntropyLossLayer([SoftmaxCrossEntropyLossDualOutputMapper, SoftmaxCrossEntropyLossMapper]),
195-
'SoftmaxCrossEntropyLossGrad':
196-
SoftmaxCrossEntropyLossGradLayer([SoftmaxCrossEntropyLossGradMapper]),
197-
'SGD':
198-
SGDLayer([SGDMapper]),
199-
'InPlaceAccumulatorV2':
200-
InPlaceAccumulatorV2Layer([InPlaceAccumulatorV2Mapper]),
116+
'Conv': ConvLayer([FPConv2DMapper, FPDWConv2DMapper]),
117+
'RequantizedConv': PULPRQSConvLayer([Conv2DMapper, DWConv2DMapper, Conv1DMapper, DWConv1DMapper]),
118+
'RequantizedGemm': PULPRQSGEMMLayer([MatrixVecMapper, TallGEMMMapper, GEMMMapper]),
119+
'Gemm': GEMMLayer([FloatGEMMMapper, GEMMDequantMapper]),
120+
'Gelu': GELULayer([GELUMapper]),
121+
'GeluGrad': GELUGradLayer([GELUGradMapper]),
122+
'LayerNormalization': LayerNormLayer([LayerNormMapper]),
123+
'LayerNormalizationGrad': LayerNormGradLayer([LayerNormGradMapper]),
124+
'MaxPool': MaxPoolLayer([MaxPool1DMapper, MaxPool2DMapper]),
125+
'RequantizediGELU': RQSiGELULayer([RQGELU_int8_Mapper]),
126+
'RQIntegerDiv': RQIntegerDivLayer([RQIntegerDivMapper]),
127+
'MatMul': MatMulLayer([MatMulMapper]),
128+
'IntegerMean': ReduceMeanLayer([ReduceMeanMapper]),
129+
'iSoftmax': SoftmaxLayer([Softmax_int8_Mapper]),
130+
'Softmax': SoftmaxLayer([SoftmaxMapper]),
131+
'ReduceMean': ReduceMeanLayer([ReduceMeanMapper]),
132+
'ReduceSum': ReduceSumLayer([ReduceSumMapper]),
133+
'RequantShift': RequantShiftLayer([UniformRequantShiftMapper, RequantShiftMapper]),
134+
'Add': AddLayer([AddMapper]),
135+
'Flatten': ReshapeLayer([FlattenMapper]),
136+
'Gather': GatherLayer([GatherMapper]),
137+
'Mul': MulLayer([MulMapper]),
138+
'Pad': PadLayer([Pad1DMapper, Pad2DMapper]),
139+
'Relu': ReluLayer([ReluMapper]),
140+
'Reshape': ReshapeLayer([ReshapeMapper]),
141+
'Squeeze': ReshapeLayer([UnsqueezeMapper]),
142+
'Transpose': TransposeLayer([TransposeMapper]),
143+
'Unsqueeze': ReshapeLayer([UnsqueezeMapper]),
144+
'Slice': SliceLayer([SliceMapper, DMASliceMapper]),
145+
'RequantizedAdd': AddLayer([RQAddMapper]),
146+
'Concat': ConcatLayer([ConcatMapper]),
147+
'iRMSNorm': iRMSNormLayer([iRMSNormMapper]),
148+
'iHardswish': iHardswishLayer([iHardswishMapper]),
149+
'RequantizediHardswish': RQSiHardswishLayer([RQSiHardswishMapper]),
150+
'Quant': QuantLayer([QuantMapper]),
151+
'Dequant': QuantLayer([DequantMapper]),
152+
'SoftmaxGrad': SoftmaxGradLayer([SoftmaxGradMapper]),
153+
'SoftmaxCrossEntropyLoss': SoftmaxCrossEntropyLossLayer([SoftmaxCrossEntropyLossMapper]),
154+
'SoftmaxCrossEntropyLossGrad': SoftmaxCrossEntropyLossGradLayer([SoftmaxCrossEntropyLossGradMapper]),
155+
'SGD': SGDLayer([SGDMapper]),
156+
'InPlaceAccumulatorV2': InPlaceAccumulatorV2Layer([InPlaceAccumulatorV2Mapper]),
201157
}
202158

203159

Deeploy/Targets/PULPOpen/Templates/SoftmaxCrossEntropyLossTemplate.py

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,11 @@
44

55
from Deeploy.DeeployTypes import NodeTemplate
66

7+
# Canonical SoftmaxCrossEntropyLoss: emits both a scalar mean loss and the
8+
# per-sample log_prob tensor.
79
referenceTemplate = NodeTemplate("""
810
BEGIN_SINGLE_CORE
911
// SoftmaxCrossEntropyLoss (Name: ${nodeName}, Op: ${nodeOp})
10-
for (uint32_t i = 0; i < ${batch}; i++) {
11-
float max_logit = ${logits}[i * ${num_classes} + 0];
12-
for (uint32_t j = 1; j < ${num_classes}; j++) {
13-
if (${logits}[i * ${num_classes} + j] > max_logit) {
14-
max_logit = ${logits}[i * ${num_classes} + j];
15-
}
16-
}
17-
18-
float32_t sum_exp = 0.0f;
19-
for (uint32_t j = 0; j < ${num_classes}; j++) {
20-
sum_exp += expf(${logits}[i * ${num_classes} + j] - max_logit);
21-
}
22-
23-
for (uint32_t j = 0; j < ${num_classes}; j++) {
24-
// log_prob = logit - max_logit - log(sum_exp)
25-
${log_prob}[i * ${num_classes} + j] = ${logits}[i * ${num_classes} + j] - max_logit - logf(sum_exp);
26-
}
27-
}
28-
END_SINGLE_CORE
29-
""")
30-
31-
referenceDualOutputTemplate = NodeTemplate("""
32-
BEGIN_SINGLE_CORE
33-
// SoftmaxCrossEntropyLoss dual-output (Name: ${nodeName}, Op: ${nodeOp})
3412
float32_t sce_total_loss = 0.0f;
3513
for (uint32_t i = 0; i < ${batch}; i++) {
3614
float32_t sce_max_logit = ${logits}[i * ${num_classes}];
@@ -49,7 +27,6 @@
4927
- sce_max_logit - sce_log_sum_exp);
5028
}
5129
${loss}[0] = sce_total_loss / (float32_t)${batch};
52-
printf(" [SCE] loss=%.6f\\r\\n", (double)${loss}[0]);
5330
END_SINGLE_CORE
5431
""")
5532

Deeploy/Targets/PULPOpen/TileConstraints/SoftmaxCrossEntropyTileConstraint.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5+
import copy
56
from typing import Dict, List, Tuple, Union
67

78
from ortools.constraint_solver.pywrapcp import IntVar
@@ -17,10 +18,18 @@
1718

1819

1920
class SoftmaxCrossEntropyTileConstraint(TileConstraint):
21+
"""TileConstraint for SoftmaxCrossEntropyLoss (2 outputs: loss + log_prob).
22+
23+
Both batch and num_classes are pinned to their full size by
24+
addPolicyConstraint, so SCE itself is never tiled — the sole purpose of
25+
the wrapTilingSolution override is to bypass the base-class single-output
26+
assertion and carry the scalar loss buffer through the DMA schedule.
27+
"""
2028

2129
dataIn1Name = 'logits'
2230
dataIn2Name = 'labels'
2331
dataOutName = 'log_prob'
32+
dataLossName = 'loss'
2433

2534
@classmethod
2635
def addGeometricalConstraint(cls, tilerModel: TilerModel, parseDict: Dict, ctxt: NetworkContext) -> TilerModel:
@@ -108,8 +117,53 @@ def serializeTilingSolution(
108117

109118
return variableReplacementSchedule, tilingSchedule
110119

120+
@classmethod
121+
def wrapTilingSolution(
122+
cls, tilingSolution: NodeMemoryConstraint, targetMemLevel: str, ctxt: NetworkContext,
123+
operatorRepresentation: OperatorRepresentation) -> Tuple[VariableReplacementScheme, List[TilingSchedule]]:
124+
"""Override the base-class single-output wrapper.
125+
126+
SoftmaxCrossEntropyLoss emits two outputs (loss + log_prob) but the
127+
base-class wrapTilingSolution asserts exactly one. We run the base
128+
wrapper on a log_prob-only slice of the tiling solution and then patch
129+
the scalar loss address / rectangle back into each resulting schedule.
130+
131+
Grad subclasses that do not have a scalar loss output fall straight
132+
through to the base-class behaviour.
133+
"""
134+
lossVar = operatorRepresentation.get(cls.dataLossName, '')
135+
136+
# No scalar loss output (e.g. Grad subclass) — plain base-class path.
137+
if not lossVar or lossVar not in tilingSolution.outputTensorMemoryConstraints:
138+
return super().wrapTilingSolution(tilingSolution, targetMemLevel, ctxt, operatorRepresentation)
139+
140+
# Log_prob-only slice of the tiling solution so the single-output
141+
# assertion in the base class passes.
142+
logProbVar = operatorRepresentation[cls.dataOutName]
143+
singleOutputSolution = copy.deepcopy(tilingSolution)
144+
singleOutputSolution.outputTensorMemoryConstraints = {
145+
logProbVar: tilingSolution.outputTensorMemoryConstraints[logProbVar]
146+
}
147+
148+
varReplacement, tilingSchedules = super().wrapTilingSolution(singleOutputSolution, targetMemLevel, ctxt,
149+
operatorRepresentation)
150+
151+
# Patch the scalar loss into each schedule's output list.
152+
lossAddr = TileConstraint.getBaseAddr(tilingSolution, targetMemLevel, lossVar)
153+
if lossAddr == [None]:
154+
return varReplacement, tilingSchedules
155+
156+
lossRect = HyperRectangle((0,), (1,))
157+
for schedule in tilingSchedules:
158+
schedule.outputBaseOffsets[cls.dataLossName] = lossAddr
159+
for step in schedule.outputLoadSchedule:
160+
step[cls.dataLossName] = lossRect
161+
162+
return varReplacement, tilingSchedules
163+
111164

112165
class SoftmaxCrossEntropyGradTileConstraint(SoftmaxCrossEntropyTileConstraint):
113166
dataIn1Name = 'log_prob'
114167
dataIn2Name = 'labels'
115168
dataOutName = 'grad'
169+
dataLossName = '' # no scalar loss output — fall through to base wrapper

Deeploy/Targets/PULPOpen/Tiler.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
PULPReshapeBindings, PULPRQAddBindings, PULPRQSBindings, PULPRQSConv1DBindings, PULPRQSConv2DBindings, \
2323
PULPRQSDWConv2DBindings, PULPRQSGEMMBindings, PULPRQSiHardswishBindings, PULPRQSMatrixVecBindings, \
2424
PULPRQSTallGEMMBindings, PULPSGDBindings, PULPSliceBindings, PULPSoftmaxBindings, \
25-
PULPSoftmaxCrossEntropyLossBindings, PULPSoftmaxCrossEntropyLossDualOutputBindings, \
26-
PULPSoftmaxCrossEntropyLossGradBindings, PULPSoftmaxGradBindings, PULPTransposeBindings, PULPUniformRQSBindings
25+
PULPSoftmaxCrossEntropyLossBindings, PULPSoftmaxCrossEntropyLossGradBindings, PULPSoftmaxGradBindings, \
26+
PULPTransposeBindings, PULPUniformRQSBindings
2727
from Deeploy.Targets.PULPOpen.TileConstraints.ConvTileConstraint import Conv2DTileConstraint, RQConv1DTileConstraint, \
2828
RQConv2DTileConstraint
2929
from Deeploy.Targets.PULPOpen.TileConstraints.DWConvTileConstraint import DWConv2DTileConstraint, \
@@ -44,8 +44,6 @@
4444
from Deeploy.Targets.PULPOpen.TileConstraints.RequantShiftTileConstraint import RequantShiftTileConstraint
4545
from Deeploy.Targets.PULPOpen.TileConstraints.SGDTileConstraint import SGDTileConstraint
4646
from Deeploy.Targets.PULPOpen.TileConstraints.SliceConstraint import SliceTileConstraint
47-
from Deeploy.Targets.PULPOpen.TileConstraints.SoftmaxCrossEntropyLossDualOutputTileConstraint import \
48-
SoftmaxCrossEntropyLossDualOutputTileConstraint
4947
from Deeploy.Targets.PULPOpen.TileConstraints.SoftmaxCrossEntropyTileConstraint import \
5048
SoftmaxCrossEntropyGradTileConstraint, SoftmaxCrossEntropyTileConstraint
5149
from Deeploy.TilingExtension.TilerExtension import TilingReadyNodeBindings
@@ -148,10 +146,6 @@
148146
PULPSoftmaxCrossEntropyTilingReadyBindings = TilingReadyNodeBindings(
149147
nodeBindings = PULPSoftmaxCrossEntropyLossBindings, tileConstraint = SoftmaxCrossEntropyTileConstraint())
150148

151-
PULPSoftmaxCrossEntropyDualOutputTilingReadyBindings = TilingReadyNodeBindings(
152-
nodeBindings = PULPSoftmaxCrossEntropyLossDualOutputBindings,
153-
tileConstraint = SoftmaxCrossEntropyLossDualOutputTileConstraint())
154-
155149
PULPSoftmaxCrossEntropyGradTilingReadyBindings = TilingReadyNodeBindings(
156150
nodeBindings = PULPSoftmaxCrossEntropyLossGradBindings, tileConstraint = SoftmaxCrossEntropyGradTileConstraint())
157151

0 commit comments

Comments
 (0)