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

【PIR API adaptor No.213、214】 Migrate CosineSimilarity/stanh into pir #58699

Merged
merged 3 commits into from
Nov 6, 2023
Merged

Conversation

DrRyanHuang
Copy link
Member

@DrRyanHuang DrRyanHuang commented Nov 5, 2023

PR types

Others

PR changes

APIs

Description

No.213、214
PIR API CosineSimilarity/stanh 推全升级

CosineSimilarity 全部通过
stanhtest_errors 未通过:

2023-11-05 16:33:38 ======================================================================
2023-11-05 16:33:38 ERROR: test_errors (test_activation_op.TestSTanhAPI)
2023-11-05 16:33:38 ERROR: test_errors (test_activation_op.TestSTanhAPIScaleA)
2023-11-05 16:33:38 ERROR: test_errors (test_activation_op.TestSTanhAPIScaleB)
2023-11-05 16:33:38 ----------------------------------------------------------------------
2023-11-05 16:33:38 Traceback (most recent call last):
2023-11-05 16:33:38   File "/workspace/Paddle/build/python/paddle/pir_utils.py", line 119, in impl
2023-11-05 16:33:38     func(*args, **kwargs)
2023-11-05 16:33:38   File "/workspace/Paddle/build/test/legacy_test/test_activation_op.py", line 3975, in test_errors
2023-11-05 16:33:38     self.assertRaises(TypeError, paddle.stanh, 1)
2023-11-05 16:33:38   File "/usr/lib/python3.10/unittest/case.py", line 738, in assertRaises
2023-11-05 16:33:38     return context.handle('assertRaises', args, kwargs)
2023-11-05 16:33:38   File "/usr/lib/python3.10/unittest/case.py", line 201, in handle
2023-11-05 16:33:38     callable_obj(*args, **kwargs)
2023-11-05 16:33:38   File "/workspace/Paddle/build/python/paddle/tensor/math.py", line 344, in stanh
2023-11-05 16:33:38     return _C_ops.stanh(x, scale_a, scale_b)
2023-11-05 16:33:38 ValueError: 
2023-11-05 16:33:38 
2023-11-05 16:33:38 --------------------------------------
2023-11-05 16:33:38 C++ Traceback (most recent call last):
2023-11-05 16:33:38 --------------------------------------
2023-11-05 16:33:38 0   paddle::pybind::static_api_stanh(_object*, _object*, _object*)
2023-11-05 16:33:38 1   phi::enforce::EnforceNotMet::EnforceNotMet(phi::ErrorSummary const&, char const*, int)
2023-11-05 16:33:38 2   phi::enforce::GetCurrentTraceBackString[abi:cxx11](bool)
2023-11-05 16:33:38 
2023-11-05 16:33:38 ----------------------
2023-11-05 16:33:38 Error Message Summary:
2023-11-05 16:33:38 ----------------------
2023-11-05 16:33:38 InvalidArgumentError: stanh(): argument (position 1) must be OpResult, but got int (at ../paddle/fluid/pybind/eager_utils.cc:1528)

@DrRyanHuang DrRyanHuang changed the title 【PIR API adaptor No.213、214】 Migrate CosineSimilarity/stanh into pir 【PIR api adaptor No.213、214】 Migrate CosineSimilarity/stanh into pir Nov 6, 2023
Copy link
Contributor

@MarioLulab MarioLulab left a comment

Choose a reason for hiding this comment

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

LGTM
test_error 可以先跳过。未来 check_dtype 相关的操作会下沉到 c++ 端

@0x45f 0x45f merged commit b88d193 into PaddlePaddle:develop Nov 6, 2023
28 checks passed
@DrRyanHuang DrRyanHuang deleted the 213-5 branch November 6, 2023 06:40
@DrRyanHuang DrRyanHuang changed the title 【PIR api adaptor No.213、214】 Migrate CosineSimilarity/stanh into pir 【PIR API adaptor No.213、214】 Migrate CosineSimilarity/stanh into pir Nov 6, 2023
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