[all-commits] [llvm/llvm-project] 85ff35: [HIP] remove overloaded abs in header

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Thu Apr 1 09:27:02 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 85ff35a9529a1ea9ed7ab8cda10761d66705d518
      https://github.com/llvm/llvm-project/commit/85ff35a9529a1ea9ed7ab8cda10761d66705d518
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2021-04-01 (Thu, 01 Apr 2021)

  Changed paths:
    M clang/lib/Headers/__clang_hip_cmath.h

  Log Message:
  -----------
  [HIP] remove overloaded abs in header

This function seems to be introduced by accident by
https://github.com/llvm/llvm-project/commit/aa2b593f1495a972a4a592952760ec9d5f7c01f1

Such overloaded abs function did not exist before
the refactoring, and does not exist in
https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/__clang_cuda_cmath.h

Conceptually it also does not make sense, since it adds something like

double abs(int x) {
  return ::abs((double)x);
}

It caused regressions in CuPy.

Reviewed by: Aaron Enye Shi, Artem Belevich

Differential Revision: https://reviews.llvm.org/D99738




More information about the All-commits mailing list