llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[libc][bazel] Add targets for f16 functions/tests to bazel files

Open Sukumarsawant opened this issue 2 months ago • 6 comments

1. Public headers

Check all implemented F16 (float16) math functions and ensure each function has both:

  • its support and
  • its public target

in llvm-project/utils/bazel/llvm-project-overlay/libc/BUILD.bazel if its been implemented.

The end result should be that every implemented F16 function with a public math header has both its support target and public libc_math_function target in the Bazel file.

2. Tests

For every F16 function implemented so far:

  • Check whether a regular MPFR-based test exists under: libc/test/src/math/
  • If it exists, check whether it is added to: llvm-project/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
  • If the test exists but its Bazel target is missing, add it.

Similarly:

  • Check whether a smoke test exists under: libc/test/src/math/smoke/
  • If it exists, check whether it is added to: llvm-project/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
  • If the smoke test exists but its Bazel target is missing, add it.

Since there are a lot of functions ( to be checked), this can be done collaboratively if needed.

Sukumarsawant avatar Sep 07 '26 18:09 Sukumarsawant

Hi!

This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:

  1. Check that no other contributor is working on this issue. If someone is assigned to the issue or claimed to be working on it, ping the person. After one week without a response, the assignee may be changed.
  2. Leave a comment indicating that you are working on the issue, or just create a pull request after following the steps below. Mention this issue in the description of the pull request.
  3. Fix the issue locally. Be aware that LLVM's AI policy forbids the use of AI tools to fix good first issues since it squanders a learning opportunity. Using LLMs to search and learn is permitted, since the goal is learning.
  4. Run the test suite locally. Remember that the subdirectories under test/ create fine-grained testing targets, so you can e.g. use make check-clang-ast to only run Clang's AST tests.
  5. Create a Git commit.
  6. Run git clang-format HEAD~1 to format your changes.
  7. Open a pull request to the upstream repository on GitHub. Detailed instructions can be found in GitHub's documentation. Mention this issue in the description of the pull request.

If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below.

@llvm/issue-subscribers-good-first-issue

Author: Zorojuro (Sukumarsawant)

1. Public headers

Check all implemented F16 (float16) math functions and ensure each function has both:

  • its support and
  • its public target

in llvm-project/utils/bazel/llvm-project-overlay/libc/BUILD.bazel if its been implemented.

The end result should be that every implemented F16 function with a public math header has both its support target and public libc_math_function target in the Bazel file.

2. Tests

For every F16 function implemented so far:

  • Check whether a regular MPFR-based test exists under: libc/test/src/math/
  • If it exists, check whether it is added to: llvm-project/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
  • If the test exists but its Bazel target is missing, add it.

Similarly:

  • Check whether a smoke test exists under: libc/test/src/math/smoke/
  • If it exists, check whether it is added to: llvm-project/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
  • If the smoke test exists but its Bazel target is missing, add it.

Since there are a lot of functions ( to be checked), this can be done collaboratively if needed.

@llvm/issue-subscribers-libc

Author: Zorojuro (Sukumarsawant)

1. Public headers

Check all implemented F16 (float16) math functions and ensure each function has both:

  • its support and
  • its public target

in llvm-project/utils/bazel/llvm-project-overlay/libc/BUILD.bazel if its been implemented.

The end result should be that every implemented F16 function with a public math header has both its support target and public libc_math_function target in the Bazel file.

2. Tests

For every F16 function implemented so far:

  • Check whether a regular MPFR-based test exists under: libc/test/src/math/
  • If it exists, check whether it is added to: llvm-project/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel
  • If the test exists but its Bazel target is missing, add it.

Similarly:

  • Check whether a smoke test exists under: libc/test/src/math/smoke/
  • If it exists, check whether it is added to: llvm-project/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
  • If the smoke test exists but its Bazel target is missing, add it.

Since there are a lot of functions ( to be checked), this can be done collaboratively if needed.

Hi, I'm studying LLVM and I'd like to work on this.

splicer3 avatar Sep 07 '26 19:09 splicer3

@splicer3 can i know if you are still working on this, if not let me know, thanks.

anandkvinu avatar Sep 14 '26 11:09 anandkvinu

@anandkvinu I actually submitted a PR covering this a few days ago (#222937)

splicer3 avatar Sep 14 '26 11:09 splicer3