Skip to content

[SWE-Paddle] Complete task package for PaddlePaddle__Paddle-78823#1435

Open
Manfredss wants to merge 1 commit into
PaddlePaddle:masterfrom
Manfredss:swe-paddle-78823-full
Open

[SWE-Paddle] Complete task package for PaddlePaddle__Paddle-78823#1435
Manfredss wants to merge 1 commit into
PaddlePaddle:masterfrom
Manfredss:swe-paddle-78823-full

Conversation

@Manfredss

Copy link
Copy Markdown
Contributor

Related issue / PR:

# before
λ /workspace/Paddle python3.10 test/legacy_test/test_to_pinned_place.py
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
Traceback (most recent call last):
  File "/workspace/Paddle/test/legacy_test/test_to_pinned_place.py", line 29, in <module>
    from paddle.base.framework import _to_pinned_place
ImportError: cannot import name '_to_pinned_place' from 'paddle.base.framework' (/usr/local/lib/python3.10/dist-packages/paddle/base/framework.py)

# after
λ /workspace/Paddle/build python3.10 test/legacy_test/test_to_pinned_place.py
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
.......
----------------------------------------------------------------------
Ran 7 tests in 0.002s

OK
# before
λ /workspace/Paddle python3.10 test/legacy_test/test_eager_tensor.py
======================================================================
ERROR: test_tensor_pin_memory_and_device (__main__.TestEagerTensor)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/workspace/Paddle/test/legacy_test/test_eager_tensor.py", line 437, in test_tensor_pin_memory_and_device
    tensor_res = paddle.tensor(
  File "/usr/local/lib/python3.10/dist-packages/paddle/__init__.py", line 826, in __call__
    return self.method(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/paddle/tensor/creation.py", line 1069, in tensor
    raise RuntimeError(f"Pinning memory is not supported for {place}.")
RuntimeError: Pinning memory is not supported for Place(cpu).

----------------------------------------------------------------------
Ran 97 tests in 2.048s

FAILED (errors=1)

# after
λ /workspace/Paddle python3.10 test/legacy_test/test_eager_tensor.py
----------------------------------------------------------------------
Ran 97 tests in 1.957s

OK
# before
λ /workspace/Paddle python3.10 test/legacy_test/test_rand.py
======================================================================
ERROR: test_pin_memory_cpu_device (__main__.TestTensorCreation)
``device='cpu', pin_memory=True`` is relaxed to the available
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/workspace/Paddle/test/legacy_test/test_rand.py", line 145, in test_pin_memory_cpu_device
    x = paddle.rand([2, 3], device=paddle.CPUPlace(), pin_memory=True)
  File "/usr/local/lib/python3.10/dist-packages/paddle/utils/decorator_utils.py", line 390, in wrapped_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/paddle/tensor/random.py", line 2467, in rand
    raise RuntimeError(f"Pinning memory is not supported for {device}")
RuntimeError: Pinning memory is not supported for Place(cpu)

----------------------------------------------------------------------
Ran 3 tests in 1.730s

FAILED (errors=1)

# after
λ /workspace/Paddle python3.10 test/legacy_test/test_rand.py
----------------------------------------------------------------------
Ran 3 tests in 1.903s

OK
# before
λ /workspace/Paddle python3.10 test/legacy_test/test_randint_op.py
======================================================================
ERROR: test_pin_memory_cpu (__main__.TestRandintDeviceRequiresGradPinMemory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/workspace/Paddle/test/legacy_test/test_randint_op.py", line 427, in test_pin_memory_cpu
    x = paddle.randint(high=10, shape=[2, 3], device='cpu', pin_memory=True)
  File "/usr/local/lib/python3.10/dist-packages/paddle/utils/decorator_utils.py", line 186, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/paddle/tensor/random.py", line 1914, in randint
    raise RuntimeError(f"Pinning memory is not supported for {place}")
RuntimeError: Pinning memory is not supported for Place(cpu)

======================================================================
ERROR: test_pin_memory_cpu_xpu_branch (__main__.TestRandintDeviceRequiresGradPinMemory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/workspace/Paddle/test/legacy_test/test_randint_op.py", line 458, in test_pin_memory_cpu_xpu_branch
    x = paddle.randint(
  File "/usr/local/lib/python3.10/dist-packages/paddle/utils/decorator_utils.py", line 186, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/paddle/tensor/random.py", line 1914, in randint
    raise RuntimeError(f"Pinning memory is not supported for {place}")
RuntimeError: Pinning memory is not supported for Place(cpu)

----------------------------------------------------------------------
Ran 23 tests in 5.378s

FAILED (errors=2)

# after
λ /workspace/Paddle python3.10 test/legacy_test/test_randint_op.py
----------------------------------------------------------------------
Ran 23 tests in 5.403s

OK
# before
λ /workspace/Paddle python3.10 test/legacy_test/test_randperm_op.py
======================================================================
ERROR: test_pin_memory_cpu_device (__main__.TestRandpermNewParams)
``device='cpu', pin_memory=True`` is relaxed to the available
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/workspace/Paddle/test/legacy_test/test_randperm_op.py", line 535, in test_pin_memory_cpu_device
    x = paddle.randperm(
  File "/usr/local/lib/python3.10/dist-packages/paddle/tensor/random.py", line 2308, in randperm
    raise RuntimeError(f"Pinning memory is not supported for {device}")
RuntimeError: Pinning memory is not supported for Place(cpu)

----------------------------------------------------------------------
Ran 21 tests in 17.790s

FAILED (errors=1, skipped=1)

# after
λ /workspace/Paddle python3.10 test/legacy_test/test_randperm_op.py
----------------------------------------------------------------------
Ran 21 tests in 17.448s

OK (skipped=1)

@sunzhongkai588 Thx

@paddle-bot

paddle-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant