-
Notifications
You must be signed in to change notification settings - Fork 5.9k
【UnitTestFix No.9】: Fix test_memcpy_op unittest error and support PIR API compatibility #75395
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
Conversation
PR Category Operator Mechanism PR Types Bug fixes Description Fix test_memcpy_op unittest error and support PIR API compatibility. The Paddle framework has migrated from old IR to new PIR (Program IR), causing API compatibility issues in static graph tests. test_memcpy_op unit test now supports PIR API and uses dynamic graph mode for better compatibility. Fixed data type checking issues where paddle.float32 corresponds to different objects in different contexts.
|
你的PR提交成功,感谢你对开源项目的贡献! |
…py_op.py - Replace all Chinese comments with English equivalents - Improve code readability for international developers - Maintain consistent comment language throughout the codebase
- Replace static graph API with dynamic graph mode to avoid PIR compatibility issues - Fix create_var and append_op calls that are not available in PIR API - Add CUDA fallback handling for CPU-only environments - Ensure all tests pass in both CUDA and CPU environments - Maintain original test logic and assertions PR Category: Operator Mechanism PR Types: Bug fixes Description: Fix memcpy unittest error and support PIR API compatibility. The test now uses dynamic graph mode to avoid PIR API compatibility issues while maintaining the same test coverage.
- Remove dependency on op_test module to fix import errors - Add local get_device_place function implementation - Fix static graph mode issues in API test - Ensure all tests pass in GPU environment with CUDA support All 5 tests now pass successfully: - test_gpu_copy_to_pinned: GPU to GPU Pinned memory copy - test_pinned_copy_gpu: GPU Pinned memory to GPU copy - test_hip_copy_bool_value: HIP environment bool value copy - test_SELECTED_ROWS: SELECTED_ROWS type error handling - test_api: API functionality test
|
请修复 CodeStyle 流水线错误 |
|
@luotao1 修复好了,请求再次批准检查 |
|
@luotao1 修复好了,等待检查 |
YqGe585
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR名称麻烦按照规范修改。 |
|
修改完成 |
|
@luotao1 请求审查 |
|
hi, @Dayuxiaoshui
|
… API compatibility (PaddlePaddle#75395) * fix: Fix test_memcpy_op unittest error and support PIR API compatibility PR Category Operator Mechanism PR Types Bug fixes Description Fix test_memcpy_op unittest error and support PIR API compatibility. The Paddle framework has migrated from old IR to new PIR (Program IR), causing API compatibility issues in static graph tests. test_memcpy_op unit test now supports PIR API and uses dynamic graph mode for better compatibility. Fixed data type checking issues where paddle.float32 corresponds to different objects in different contexts. * refactor: Replace Chinese comments with English comments in test_memcpy_op.py - Replace all Chinese comments with English equivalents - Improve code readability for international developers - Maintain consistent comment language throughout the codebase * Fix test_memcpy_op unittest compatibility with PIR API - Replace static graph API with dynamic graph mode to avoid PIR compatibility issues - Fix create_var and append_op calls that are not available in PIR API - Add CUDA fallback handling for CPU-only environments - Ensure all tests pass in both CUDA and CPU environments - Maintain original test logic and assertions PR Category: Operator Mechanism PR Types: Bug fixes Description: Fix memcpy unittest error and support PIR API compatibility. The test now uses dynamic graph mode to avoid PIR API compatibility issues while maintaining the same test coverage. * Fix test_memcpy_op.py for GPU environment compatibility - Remove dependency on op_test module to fix import errors - Add local get_device_place function implementation - Fix static graph mode issues in API test - Ensure all tests pass in GPU environment with CUDA support All 5 tests now pass successfully: - test_gpu_copy_to_pinned: GPU to GPU Pinned memory copy - test_pinned_copy_gpu: GPU Pinned memory to GPU copy - test_hip_copy_bool_value: HIP environment bool value copy - test_SELECTED_ROWS: SELECTED_ROWS type error handling - test_api: API functionality test * chore: fix EOF newline for test_memcpy_op.py via pre-commit end-of-file-fixer * test(legacy): replace get_device_place with base.CUDAPlace(0); fix EOF newline
PR Category
Operator Mechanism
PR Types
Bug fixes
Description