-
Notifications
You must be signed in to change notification settings - Fork 43
Add 2D Autoencoder and GMM Integration on Siracusa Target #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Changes from all commits
9760e89
07f4f94
d721076
352a7eb
3e0bbb5
3f0aa2a
8f2341b
b1e7efb
3ced973
95f93ed
1c790a9
c69112c
4bc5086
63a8185
7edd22c
1c5a406
13a3524
98be957
85ad725
633356f
5ff6727
287fb76
07c1f47
3169a59
58e93e4
50fed19
02efee2
2e472cc
612e0dd
29c57b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only changes to this file are blank lines. Please revert them completely. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,8 @@ def apply(self, graph: gs.Graph) -> Tuple[gs.Graph]: | |
| engine = self.engineMapper.mapNodeToEngine(node, graph) | ||
| if engine is not None: | ||
| node.attrs["engine"] = engine.name | ||
| if hasattr(engine, "n_cores"): | ||
| node.attrs["n_cores"] = engine.n_cores | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not a good approach IMO. The number of cores is not a node attribute (conceptually, the node attributes should follow the ones that exist in the real ONNX nodes). Plus, this issue of passing the information about the number of cores should already be solved, and the value should already exist in the operator representation, it's passed here. If this value doesn't get passed in your case, we should identify the root cause.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking a little more into it, maybe you need to add NeurekaEngine in the list here. |
||
| return graph | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -340,6 +340,12 @@ def computeShapes(self, inputShapes: Shape, outputShapes: Shape, operatorReprese | |
| if inputShapes[1] == () or inputShapes[1] == []: | ||
| inputShapes[1] = (1,) | ||
|
|
||
| # Scalars and singletons should broadcast to the tensor operand, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? |
||
| # not shrink the tensor shape to (1,). | ||
| if tuple(inputShapes[1]) == (1,): | ||
| inputShapes[1] = inputShapes[0] | ||
| return (inputShapes, outputShapes) | ||
|
|
||
| if len(inputShapes[0]) > len(inputShapes[1]): | ||
| inputShapes[1] = inputShapes[0] | ||
| else: | ||
|
|
@@ -438,6 +444,27 @@ def computeShapes(self, inputShapes: Shape, outputShapes: Shape, operatorReprese | |
| return (inputShapes, outputShapes) | ||
|
|
||
|
|
||
| class ReduceLogSumExpLayer(ONNXLayer): | ||
|
|
||
| def __init__(self, maps: List[NodeMapper]): | ||
| super().__init__(maps) | ||
|
|
||
| def computeShapes(self, inputShapes: Shape, outputShapes: Shape, operatorRepresentation, | ||
| channels_first) -> Tuple[Shape, Shape]: | ||
| axis = operatorRepresentation['axes'][0] | ||
| inputShape = list(copy.deepcopy(inputShapes[0])) | ||
|
|
||
| if operatorRepresentation['keepdims']: | ||
| outputShape = inputShape | ||
| outputShape[axis] = 1 | ||
| else: | ||
| outputShape = inputShape[:axis] + inputShape[axis + 1:] | ||
| if len(outputShape) == 0: | ||
| outputShape = [1] | ||
|
|
||
| return (inputShapes, [outputShape]) | ||
|
|
||
|
|
||
| class ReluLayer(ONNXLayer): | ||
|
|
||
| def __init__(self, maps: List[NodeMapper]): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that these changes were made to adjust your local work env, and should not be pushed to main. Please revert them.