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

add torch.positive #4999

Merged
merged 8 commits into from
Sep 5, 2023
Merged

add torch.positive #4999

merged 8 commits into from
Sep 5, 2023

Conversation

nicochen1118
Copy link
Contributor

No description provided.

@tencent-adm
Copy link
Member

tencent-adm commented Sep 2, 2023

CLA assistant check
All committers have signed the CLA.

@nicochen1118
Copy link
Contributor Author

Sorry, why the checks were not successful?

@nihui
Copy link
Member

nihui commented Sep 4, 2023

Sorry, why the checks were not successful?

torch-1.8 does not have torch.positive
you can move to test to conditional section, like F.mish

 Traceback (most recent call last):
  File "/data/devops/workspace/tools/pnnx/tests/test_torch_positive.py", line 58, in <module>
    if test():
  File "/data/devops/workspace/tools/pnnx/tests/test_torch_positive.py", line 38, in test
    a = net(x, y, z)
  File "/data/devops/workspace/torch-1.8.1/lib/python3.9/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/data/devops/workspace/tools/pnnx/tests/test_torch_positive.py", line 24, in forward
    x = torch.positive(x)
AttributeError: module 'torch' has no attribute 'positive'
CMake Error at /data/devops/workspace/tools/pnnx/tests/run_test.cmake:5 (message):
  Test failed with return value '1'

tools/pnnx/src/CMakeLists.txt Outdated Show resolved Hide resolved
@nihui nihui merged commit 4923fb9 into Tencent:master Sep 5, 2023
6 checks passed
@nihui
Copy link
Member

nihui commented Sep 5, 2023

Thanks for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants