Skip to content

[SYCL-PTX] Add math builtins categories #1990

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

Merged
merged 5 commits into from
Jun 30, 2020

Conversation

Naghasan
Copy link
Contributor

The patch adds the generic SPIR-V implementation for the math builtins (so nvptx specific implementation yet).

Signed-off-by: Victor Lomuller victor@codeplay.com
Co-authored-by: David Wood david.wood@codeplay.com

@Naghasan Naghasan requested review from bader and a team as code owners June 26, 2020 09:27
@Naghasan Naghasan requested a review from sergey-semenov June 26, 2020 09:27
Signed-off-by: Victor Lomuller <victor@codeplay.com>
Co-authored-by: David Wood <david.wood@codeplay.com>
@Naghasan Naghasan force-pushed the victor/spirv-ptx-math branch from 64e9720 to 35fbd3f Compare June 26, 2020 12:30
@@ -8,7 +8,7 @@

#include <spirv/spirv.h>

#include "../../lib/clcmacro.h"
#include <clcmacro.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably should belong to other PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these "common" built-ins are used in "math" built-ins implementation, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably should belong to other PR.

That's a change that relates to the refactoring prior to this patch. This wasn't part of it as it directly conflicted with the PR #1832. This avoided a dependency.

The header file included is the same, ../../lib/clcmacro.h is a link to the one in include. So there is no functional change, just consistency.

I assume these "common" built-ins are used in "math" built-ins implementation, right?

Some common builtins are indeed used by the math one.

*/

#include <clc/clc.h>
//===----------------------------------------------------------------------===//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... shouldn't we keep old AMD copyright header?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can revert if you prefer.

Technically, the LLVM relicensed all sub-projects under this license, but this one never updated the headers. But I'm no lawyer.

Naghasan and others added 4 commits June 26, 2020 15:51
Co-authored-by: Alexey Bader <alexey.bader@intel.com>
Co-authored-by: Alexey Bader <alexey.bader@intel.com>
Co-authored-by: Alexey Bader <alexey.bader@intel.com>
Co-authored-by: Alexey Bader <alexey.bader@intel.com>
@bader bader added the cuda CUDA back-end label Jun 29, 2020
@bader bader merged commit 0c9c9c0 into intel:sycl Jun 30, 2020
@bader bader added the libclc libclc project related issues label Jul 3, 2020
kchusha pushed a commit to kchusha/llvm that referenced this pull request May 10, 2023
…tel#1990)

Add the library `BINARY_DIR` to `LD_LIBRARY_PATH` to ensure that
the freshly built `libLLVMSPIRVLib.so` is tested.  Otherwise, llvm-spirv
spawned by the test suite may use the previously installed
`libLLVMSPIRVLib.so`.

I have noticed the problem after rebuilding LLVM with
`-DLLVM_ENABLE_ASSSERTIONS=ON`.  This meant that the previous version
of `libLLVMSPIRVLib.so` now crashed, effectively causing the test suite
to fail incorrectly.

Signed-off-by: Michał Górny <mgorny@gentoo.org>

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@ba965cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA back-end libclc libclc project related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants