reshape、transpose、concat、broadcast_to#17
Merged
miaobyte merged 3 commits intoarray2d:mainfrom Apr 7, 2025
Merged
Conversation
There was a problem hiding this comment.
Copilot reviewed 18 out of 31 changed files in this pull request and generated 2 comments.
Files not reviewed (13)
- excuter/cpp-common/src/deepx/shape.cpp: Language not supported
- excuter/cpp-common/src/deepx/shape_broadcast.hpp: Language not supported
- excuter/cpp-common/src/deepx/tensorfunc/changeshape.hpp: Language not supported
- excuter/op-mem-cuda/src/client/tfs.cpp: Language not supported
- excuter/op-mem-cuda/src/deepx/tensorfunc/broadcast.hpp: Language not supported
- excuter/op-mem-cuda/src/deepx/tensorfunc/changeshape_miaobyte.cu: Language not supported
- excuter/op-mem-cuda/src/deepx/tensorfunc/changeshape_miaobyte.cuh: Language not supported
- excuter/op-mem-cuda/src/deepx/tensorfunc/changeshape_miaobyte.hpp: Language not supported
- excuter/op-mem-cuda/src/deepx/tf/changeshape.hpp: Language not supported
- excuter/op-mem-cuda/test/tensorfunc/2_changeshape.cpp: Language not supported
- excuter/op-mem-ompsimd/src/client/tfs.cpp: Language not supported
- excuter/op-mem-ompsimd/src/deepx/tensorfunc/changeshape_miaobyte.hpp: Language not supported
- excuter/op-mem-ompsimd/src/deepx/tf/changeshape.hpp: Language not supported
Comments suppressed due to low confidence (2)
front/py/deepx/tensor/changeshape.py:35
- Removing the axes parameter in 'transpose_' may not be intentional; if this method is meant to always swap the last two dimensions, please clarify the behavior or adjust the signature accordingly.
def transpose_(self):
front/py/deepx/nn/functional/changeshape.py:187
- Undefined variable 't' used in BroadcastTo.backward; ensure a proper tensor reference is provided for the backward computation.
return _A_v_elementwiseop_C(out_grad,new_shape,"broadcastTo",t.node.name,author)
Comment on lines
61
to
+62
| @property | ||
| def shape(self): | ||
| return self._shape.shape | ||
| def shape(self,dim:int=None): |
There was a problem hiding this comment.
Defining a property with an extra parameter deviates from typical Python property usage. Consider converting 'shape' to a regular method (e.g., 'get_shape') if a parameter is needed.
Comment on lines
+127
to
+128
| return _A_v_elementwiseop_C(out_grad,dim,"concat",t.node.name,author) | ||
|
|
There was a problem hiding this comment.
Undefined variable 't' used in Concat.backward; use a valid tensor reference (e.g., from saved context) or correct the identifier.
Suggested change
| return _A_v_elementwiseop_C(out_grad,dim,"concat",t.node.name,author) | |
| tensors = ctx.get_data('tensors') | |
| return _A_v_elementwiseop_C(out_grad, dim, "concat", tensors[0].node.name, author) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.