[all-commits] [llvm/llvm-project] 987e1b: [CUDA][HIP] Fix std::min in wrapper header (#93976)

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Mon Jun 3 08:07:06 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 987e1b2ae3348a86b3f625119184a0f431c33bc7
      https://github.com/llvm/llvm-project/commit/987e1b2ae3348a86b3f625119184a0f431c33bc7
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2024-06-03 (Mon, 03 Jun 2024)

  Changed paths:
    M clang/lib/Headers/cuda_wrappers/algorithm
    A clang/test/Headers/cuda_wrapper_algorithm.cu

  Log Message:
  -----------
  [CUDA][HIP] Fix std::min in wrapper header (#93976)

The std::min behaves like 'a<b?a:b', which does not match
libstdc++/libc++ behavior like 'b<a?b:a' when input is NaN.

Make it consistent with libstdc++/libc++.

Fixes: https://github.com/llvm/llvm-project/issues/93962

Fixes: https://github.com/ROCm/HIP/issues/3502



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list