flagos-ai / flagos-ai/FlagBLAS

Ci test Test_doct.py fail

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3
Forks
7
Avg merge
11h 54m
Merged PRs (30d)
38

Description

12m 1s
/home/flagblas/action_runner/_work/FlagBLAS/FlagBLAS/.venv/lib/python3.12/site-packages/triton/runtime/autotuner.py:99: DeprecationWarning: warmup, rep, and use_cuda_graph parameters are deprecated. See https://github.com/triton-lang/triton/pull/4496 for details.
warnings.warn(("warmup, rep, and use_cuda_graph parameters are deprecated. See "

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
====================== 506 passed, 105 warnings in 5.42s =======================
Running quick-cpu mode unit tests for tests/test_dot.py
[Note] No specialized common operators were found inthe nvidia implementation, and general common operators are used by default.
[Note] No specialized fused operators were found inthe nvidia implementation, and general fused operators are used by default.
[correctness] reference backend: CPU (--ref cpu)
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0
rootdir: /home/flagblas/action_runner/_work/FlagBLAS/FlagBLAS
configfile: pytest.ini
collected 144 items

tests/test_dot.py ................................................................................................................................................

=============================== warnings summary ===============================
.venv/lib/python3.12/site-packages/triton/runtime/autotuner.py:99: 105 warnings
/home/flagblas/action_runner/_work/FlagBLAS/FlagBLAS/.venv/lib/python3.12/site-packages/triton/runtime/autotuner.py:99: DeprecationWarning: warmup, rep, and use_cuda_graph parameters are deprecated. See https://github.com/triton-lang/triton/pull/4496 for details.
warnings.warn(("warmup, rep, and use_cuda_graph parameters are deprecated. See "

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================ 144 passed, 105 warnings in 101.08s (0:01:41) =================
Running quick-cpu mode unit tests for tests/test_dotc.py
[Note] No specialized common operators were found inthe nvidia implementation, and general common operators are used by default.
[Note] No specialized fused operators were found inthe nvidia implementation, and general fused operators are used by default.
[correctness] reference backend: CPU (--ref cpu)
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0
rootdir: /home/flagblas/action_runner/_work/FlagBLAS/FlagBLAS
configfile: pytest.ini
collected 150 items

tests/test_dotc.py ......................................................................................................................................................

=============================== warnings summary ===============================
.venv/lib/python3.12/site-packages/triton/runtime/autotuner.py:99: 105 warnings
/home/flagblas/action_runner/_work/FlagBLAS/FlagBLAS/.venv/lib/python3.12/site-packages/triton/runtime/autotuner.py:99: DeprecationWarning: warmup, rep, and use_cuda_graph parameters are deprecated. See https://github.com/triton-lang/triton/pull/4496 for details.
warnings.warn(("warmup, rep, and use_cuda_graph parameters are deprecated. See "

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================ 150 passed, 105 warnings in 199.96s (0:03:19) =================
Running quick-cpu mode unit tests for tests/test_dotu.py
[Note] No specialized common operators were found inthe nvidia implementation, and general common operators are used by default.
[Note] No specialized fused operators were found inthe nvidia implementation, and general fused operators are used by default.
[correctness] reference backend: CPU (--ref cpu)
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.1.1, pluggy-1.6.0
rootdir: /home/flagblas/action_runner/_work/FlagBLAS/FlagBLAS
configfile: pytest.ini
collected 142 items

tests/test_dotu.py F

=================================== FAILURES ===================================
________________ test_accuracy_dotu_complex[1-1-shape0-dtype0] _________________

dtype = torch.complex64, shape = (1024,), incx = 1, incy = 1

@pytest.mark.dotu
@pytest.mark.parametrize("dtype", [torch.complex64, torch.complex128])
@pytest.mark.parametrize("shape", DOTU_SHAPES)
@pytest.mark.parametrize("incx,incy", L1_PAIR_STRIDES)
def test_accuracy_dotu_complex(dtype, shape, incx, incy):
"""Test dotu with various shapes, strides, and complex dtypes."""
if dtype == torch.complex128 and not flag_blas.runtime.device.support_fp64:
pytest.skip("Device does not support float64/complex128")

n = shape[0]
x = torch.randn(n * incx, dtype=dtype, device=flag_blas.device)
y = torch.randn(n * incy, dtype=dtype, device=flag_blas.device)

result = torch.zeros(1, dtype=dtype, device=flag_blas.device)
ref_result = torch.zeros(1, dtype=dtype, device=flag_blas.device)

dotu_reference(n, x.clone(), incx, y.clone(), incy, ref_result)

if dtype == torch.complex64:
flag_blas.ops.cdotu(n, x, incx, y, incy, result)
else:
flag_blas.ops.zdotu(n, x, incx, y, incy, result)

rtol, atol = _dotu_tolerances(dtype)
> blas_assert_close(result, ref_result, dtype, reduce_dim=n)

tests/test_dotu.py:105:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/accuracy_utils.py:396: in blas_assert_close
res, ref = to_cpu(res, ref)
^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

res = tensor([-1.3937+32.2519j])
ref = tensor([-1.3937+32.2519j], device='cuda:0')

def to_cpu(res, ref):
if TO_CPU and isinstance(res, torch.Tensor) and isinstance(ref, torch.Tensor):
res = res.to("cpu")
> assert ref.device == torch.device("cpu")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E AssertionError

tests/accuracy_utils.py:391: AssertionError
=============================== warnings summary ===============================
.venv/lib/python3.12/site-packages/triton/runtime/autotuner.py:99: 105 warnings
/home/flagblas/action_runner/_work/FlagBLAS/FlagBLAS/.venv/lib/python3.12/site-packages/triton/runtime/autotuner.py:99: DeprecationWarning: warmup, rep, and use_cuda_graph parameters are deprecated. See https://github.com/triton-lang/triton/pull/4496 for details.
warnings.warn(("warmup, rep, and use_cuda_graph parameters are deprecated. See "

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_dotu.py::test_accuracy_dotu_complex[1-1-shape0-dtype0] - AssertionError
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
======================= 1 failed, 105 warnings in 1.77s ========================
Error: Process completed with exit code 1.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with tests/test_dotu.py and reproduce the failing test_accuracy_dotu_complex case in quick-cpu mode. Read the related device-handling logic in tests/accuracy_utils.py and compare the reference and result devices shown in the traceback. Done means the CI dotu test suite completes successfully without this assertion failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
ci-cd, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.