Skip to content
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

Improve parsing of PyTorch functional layers arguments #923

Merged
merged 6 commits into from
Jan 18, 2024

Conversation

Idan-BenAmi
Copy link
Collaborator

@Idan-BenAmi Idan-BenAmi commented Jan 14, 2024

Pull Request Description:

Support PyTorch nn.functional.layer_norm and add a relevant test.

Checklist before requesting a review:

  • I set the appropriate labels on the pull request.
  • I have added/updated the release note draft (if necessary).
  • I have updated the documentation to reflect my changes (if necessary).
  • All function and files are well documented.
  • All function and classes have type hints.
  • There is a licenses in all file.
  • The function and variable names are informative.
  • I have checked for code duplications.
  • I have added new unittest (if necessary).


# If function inputs and arguments requires specific order, sort it before the call
elif isinstance(n, FunctionalNode) and n.op_call_args_order and not (len(n.op_call_args_order) > len(input_tensors + op_call_args)):
args = [(input_tensors + op_call_args)[ind] for ind in n.op_call_args_order]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add and example of an operation for each one in the comments so it will be more clear?

@@ -0,0 +1,66 @@
# Copyright 2024 Sony Semiconductor Israel, Inc. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a feature model test or a layer test? If layer there is a library for layer tests maybe add it there

@Idan-BenAmi Idan-BenAmi merged commit 7638816 into sony:main Jan 18, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants