Skip to content

Failing to run the Correctness Test #6

Open

Description

@Sjw82874

Hi, thanks for your wonderful work. I encountered a problem with the correctness test. Specifically, when testing the performance of GEMM + ReduceScatter, there were no errors in the previous steps. However, in the final correctness test, the error message would display "invalid configuration argument", as shown below.

(flash) root@autodl-container-4c754cbcba-f48cee1a:~/autodl-tmp/FlashOverlap/example# CUDA_VISIBLE_DEVICES=0,1 python correctness_rs.py --m 4096 --n 12288 --k 49152
NCCL ID generated: 1656249504523179129
[rank0]:[W812 01:53:26.685096222 ProcessGroupNCCL.cpp:1250] Warning: WARNING: process group has NOT been destroyed before we destruct ProcessGroupNCCL. On normal program exit, the application should call destroy_process_group to ensure that any pending NCCL operations have finished in this process. In rare cases this process can exit before this point and block the progress of another member of the process group. This constraint has always been present,  but this warning has only been added since PyTorch 2.4 (function operator())
W0812 01:53:29.140000 18229 site-packages/torch/multiprocessing/spawn.py:160] Terminating process 18258 via signal SIGTERM
Traceback (most recent call last):
  File "/root/autodl-tmp/FlashOverlap/example/correctness_rs.py", line 95, in <module>
    main()
  File "/root/autodl-tmp/FlashOverlap/example/correctness_rs.py", line 88, in main
    mp.spawn(
  File "/root/miniconda3/envs/flash/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 328, in spawn
    return start_processes(fn, args, nprocs, join, daemon, start_method="spawn")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/flash/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 284, in start_processes
    while not context.join():
              ^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/flash/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 203, in join
    raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException: 

-- Process 1 terminated with the following error:
Traceback (most recent call last):
  File "/root/miniconda3/envs/flash/lib/python3.11/site-packages/torch/multiprocessing/spawn.py", line 90, in _wrap
    fn(i, *args)
  File "/root/autodl-tmp/FlashOverlap/example/correctness_rs.py", line 55, in per_gpu_process
    all_close = torch.allclose(y1, y2, atol=5e-2, rtol=5e-2)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: invalid configuration argument
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.

I run the code on a cloud server with 2 GPUs of A100 PCle(40GB) and the Python version of 3.11. All package versions are the same as those in the README.md. What's the reason for this problem?

Activity

  1. hkeee21 commented on Aug 15, 2025

    @hkeee21
    Collaborator

    Thanks for trying. It is because the implemented RMSNorm only supports N <= 8192. I have fixed the bug and pushed the code.

    For this case, since the K dimension is large, the results may not all be close due to the difference in accumulation order; however, the largest difference appears to be normal.

  2. Sjw82874 commented on Aug 21, 2025

    @Sjw82874
    Author

    Thanks very much for modifying the code. I redeploy the model and conduct the correctness test again, with the largest difference being around 0.15~0.2. Although the results are not close, this should be tolerable considering the large value of K.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions