Skip to content

add torch.positive#4999

Merged
nihui merged 8 commits intoTencent:masterfrom
nicochen1118:torch_positive
Sep 5, 2023
Merged

add torch.positive#4999
nihui merged 8 commits intoTencent:masterfrom
nicochen1118:torch_positive

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'

@nihui nihui merged commit 4923fb9 into Tencent:master Sep 5, 2023
@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