-
Notifications
You must be signed in to change notification settings - Fork 787
[libclc] Add new function implementations in math. #4864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@bader Excuse me to interrupt, can you please see if the new request meets the requirements? |
@jchlanda Excuse me to interrupt, can you please see if the new request meets the requirements? |
@t4c1 Excuse me to interrupt, can you please see if the new request meets the requirements? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
The description doesn't really help reviewers.
Could you clarify what suggestion do you mean here?
Which function implementations were added and what is "the operator"? Could you provide more context, please? |
@bader Sorry to trouble you, I mean the suggestions made by you and other reviewers in the last request, including removing redundant comment codes, adding open source information in the code, and modifying the newly added names in the SOURCE file Arrange lexicographically, etc. |
@bader In the math package, there are only atan.cl, cbrt.cl, cos.cl, sin.cl, and sqrt.cl files initially. The other files in the math package I submitted this time are all newly implemented. We are using the SYCL-CTS test set for testing, one of which is the math_builtin_api test. Only when these files are newly added can it be compiled and passed. I'm sorry for not being able to describe clearly before, thank you for your patience to advise me. |
Do you refer to #4849? |
Thanks. Please, add this information to the pull request description. |
@GYDmedwin, could you fix formatting, please? |
…to standardize the code.
#include <clcmacro.h> | ||
#include <spirv/spirv.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting... clang-format doesn't complain here - all code except the first comment block is shifted by 2 spaces.
/summary:run |
I listed the source files that are not found. CMake Error at /path/to/llvm/libclc/cmake/modules/AddLibclc.cmake:54 (add_library):
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm |
@zjin-lcf Sorry, this is an error, you can delete the file name directly in the SOURCE file. |
I appreciate very much your effort of adding many math functions for the HIP support! |
@zjin-lcf Thank you for your appreciation, and I am also very grateful to you and other reviewers for your suggestions to me, which allowed me to learn a lot of new knowledge. |
@GYDmedwin I have a question. Are 'fma', 'ilogb', and 'sinh' the last three un-implemented math functions ? |
@zjin-lcf In my test,‘ilogb’, ‘log2’, ‘remainder’ the last three un-implemented math functions. I am trying to implement them, but there are still some problems. I did not encounter ‘fma’, it may be my handwriting wrong. The ‘sinh’ source file was dropped, I will upload it now. I am currently repairing ‘ilogb’ and have been testing it. I forgot to delete its name in the SOURCE file. Thank you for your careful inspection, I will correct it immediately. |
@GYDmedwin No problem. I am building the repository with the Python script and observed some errors that abort the compilation.
|
@zjin-lcf Sorry, I did not encounter this problem when compiling, I will take time to look at this problem later, thank you. |
I will try again. Thanks. |
I needed to comment the lines in the ldexp.cl so that the compile script in Python would not report compile error shown above. |
I tried an example and got the following error. Is it reproducible ? If not, I will build again. Thanks. lld: error: undefined hidden symbol: __spirv_ocl_frexp(float, int*) |
The example is https://github.com/zjin-lcf/HeCBench/tree/master/rfs-sycl |
@GYDmedwin I've been able to reproduce the error that @zjin-lcf got so I will look into it. |
@bader Sure, I just need to get my head around the macros first! |
In the math package, there are only atan.cl, cbrt.cl, cos.cl, sin.cl, and sqrt.cl files initially. The other files in the math package I submitted this time are all newly implemented. We are using the SYCL-CTS test set for testing, one of which is the math_builtin_api test. Only when these files are newly added can it be compiled and passed.