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

pnnx fix onnx clip conversion, add onnx clamp test, always reserve onnx split outputs, convert onnx mod #5834

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

nihui
Copy link
Member

@nihui nihui commented Dec 19, 2024

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (5)
  • tools/pnnx/src/pass_level2/torch_clamp.cpp: Language not supported
  • tools/pnnx/src/pass_onnx.cpp: Language not supported
  • tools/pnnx/src/pass_onnx/dead_code_elimination.cpp: Language not supported
  • tools/pnnx/src/pass_onnx/fuse_constant_as_attribute.cpp: Language not supported
  • tools/pnnx/tests/onnx/CMakeLists.txt: Language not supported


# onnx to pnnx
import os
os.system("../../src/pnnx test_torch_clamp.onnx inputshape=[1,3,16],[1,5,9,11],[14,8,5,9,10]")
Copy link
Preview

Copilot AI Dec 19, 2024

Choose a reason for hiding this comment

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

Using os.system for executing shell commands can be insecure and is generally discouraged. Consider using the subprocess module for better security and error handling.

Suggested change
os.system("../../src/pnnx test_torch_clamp.onnx inputshape=[1,3,16],[1,5,9,11],[14,8,5,9,10]")
subprocess.run(['../../src/pnnx', 'test_torch_clamp.onnx', 'inputshape=[1,3,16],[1,5,9,11],[14,8,5,9,10]'], check=True)

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@nihui nihui merged commit 78aca5d into Tencent:master Dec 19, 2024
9 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.

1 participant