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

[Dy2St] pir dy2st unittest verification - Part -3 #59571

Merged
merged 9 commits into from
Dec 12, 2023
Merged

[Dy2St] pir dy2st unittest verification - Part -3 #59571

merged 9 commits into from
Dec 12, 2023

Conversation

DrRyanHuang
Copy link
Member

@DrRyanHuang DrRyanHuang commented Nov 30, 2023

PR types

Others

PR changes

Others

Description

状态 单测 错误类别 备注 报错信息
✅93 test_pir_selectedrows
❌94 test_bert {test_train, test_train_composite} ? 段错误
95 test_tensor_memcpy_on_cpu
❌96 test_program_translator {TestIfElseEarlyReturn} API __eq__ Value & int
❌97 test_grad {TestGrad} ? Segmentation fault
❌97 test_grad {TestGradLinear} Save/Load

相关链接:

@DrRyanHuang
Copy link
Member Author

DrRyanHuang commented Nov 30, 2023

test_program_translator 无法开启理想态

class TestIfElseEarlyReturn(Dy2StTestBase):
    def test_ifelse_early_return1(self):
        answer = np.zeros([2, 2]) + 1
        static_func = paddle.jit.to_static(dyfunc_with_if_else_early_return1)
        out = static_func()
        np.testing.assert_allclose(answer, out[0].numpy(), rtol=1e-05)

    def test_ifelse_early_return2(self):
        answer = np.zeros([2, 2]) + 3
        static_func = paddle.jit.to_static(dyfunc_with_if_else_early_return2)
        out = static_func()
        np.testing.assert_allclose(answer, out[0].numpy(), rtol=1e-05)
    File "/home/aistudio/giao/Paddle/build/python/paddle/jit/sot/symbolic/interpreter.py", line 178, in wrapper
        return interpreter.run_sir(name, state)
    File "/home/aistudio/giao/Paddle/build/python/paddle/jit/sot/symbolic/interpreter.py", line 116, in run_sir
        outs = getattr(self, stmt.type)(stmt, inputs)
    File "/home/aistudio/giao/Paddle/build/python/paddle/jit/sot/symbolic/interpreter.py", line 150, in method
        return getattr(var, stmt.method)(*args[1:], **kwargs)

    TypeError: __eq__(): incompatible function arguments. The following argument types are supported:
    1. (self: paddle.base.libpaddle.pir.Value, arg0: paddle.base.libpaddle.pir.Value) -> bool

Invoked with: Value(define_op_name=pd_op.assign_value_, index=0, dtype=pd_op.tensor<1xi64>), 0

@DrRyanHuang DrRyanHuang marked this pull request as draft December 1, 2023 02:09
@DrRyanHuang
Copy link
Member Author

test_bert 无法开启理想态
test_traintest_train_composite 都是

The owner op type is:pd_op.full_like
*** Check failure stack trace: ***
    @     0x7f869968e27d  google::LogMessage::Fail()
    @     0x7f869969052d  google::LogMessage::SendToLog()
    @     0x7f869968dd6d  google::LogMessage::Flush()
    @     0x7f8699691029  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f869af62e07  pir::detail::OpResultImpl::~OpResultImpl()
    @     0x7f869af66803  pir::Operation::Destroy()
    @     0x7f869af4ae26  pir::Block::erase()
    @     0x7f869948937b  _ZZN8pybind1112cpp_function10initializeIZN6paddle6pybind9BindBlockEPNS_7module_EEUlRN3pir5BlockEPNS6_9OperationEE5_vJS8_SA_EJNS_4nameENS_9is_methodENS_7siblingEA172_cEEEvOT_PFT0_DpT1_EDpRKT2_ENUlRNS_6detail13function_callEE1_4_FUNEST_
    @     0x7f8699038528  pybind11::cpp_function::dispatcher()
    @           0x5d80be  (unknown)
    @           0x5d8d8c  _PyObject_MakeTpCall
    @           0x4fedd4  (unknown)
    @           0x47c416  (unknown)
    @           0x499082  (unknown)
    @           0x5d8868  _PyFunction_Vectorcall
    @           0x47c416  (unknown)
    @           0x4990a5  (unknown)
    @           0x55cd91  _PyEval_EvalCodeWithName
    @           0x5d8941  _PyFunction_Vectorcall
    @           0x47c416  (unknown)
    @           0x4997f3  (unknown)
    @           0x5d8868  _PyFunction_Vectorcall
    @           0x47c416  (unknown)
    @           0x4990a5  (unknown)
    @           0x55cd91  _PyEval_EvalCodeWithName
    @           0x5d8941  _PyFunction_Vectorcall
    @           0x47c416  (unknown)
    @           0x4997f3  (unknown)
    @           0x5d8868  _PyFunction_Vectorcall
    @           0x5d8506  PyVectorcall_Call
    @           0x55f797  _PyEval_EvalFrameDefault
    @           0x55d078  _PyEval_EvalCodeWithName

@DrRyanHuang
Copy link
Member Author

test_grad 无法开启理想态

--------------------------------------
C++ Traceback (most recent call last):
--------------------------------------
0   paddle::pybind::GetValueDtype(pir::Value)
1   pir::Type::type_id()

----------------------
Error Message Summary:
----------------------
FatalError: `Segmentation fault` is detected by the operating system.
  [TimeInfo: *** Aborted at 1701419815 (unix time) try "date -d @1701419815" if you are using GNU date ***]
  [SignalInfo: *** SIGSEGV (@0x0) received by PID 1772305 (TID 0x7f0573b5e740) from PID 0 ***]

@DrRyanHuang

This comment was marked as off-topic.

@DrRyanHuang DrRyanHuang marked this pull request as ready for review December 1, 2023 08:57
@SigureMo
Copy link
Member

SigureMo commented Dec 4, 2023

test_pir_selectedrows 可以改写下,该单测写法依赖于整图训练 train step(即 to_static 装饰包含前反向),但这个单测是不依赖于这个特性的,所以可以改写成 to_static 仅装饰 net 前向部分

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow

@SigureMo SigureMo merged commit 346aa1f into PaddlePaddle:develop Dec 12, 2023
29 checks passed
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.

2 participants