-
Notifications
You must be signed in to change notification settings - Fork 801
[SYCL] Remove devicelib jit link #20777
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
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2d50750
remove dummy bin
jinge90 9c76946
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 fe628a9
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 7a7e62b
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 cda3d97
[SYCL] Remove sycl device library jit link path
jinge90 4de8fa5
merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 8896996
Merge remote-tracking branch 'upstream/sycl' into remove_devicelib_ji…
jinge90 9851857
remove devicelib req mask in toolchain
jinge90 efb663e
fix sycl-linker-wrapper-image lit test
jinge90 1dee8d5
remove legacy test for devicelib req_mask
jinge90 5e4f63c
remove deprecated environment variable
jinge90 73bfe6f
Merge remote-tracking branch 'upstream/sycl' into remove_devicelib_ji…
jinge90 b88aedb
Merge remote-tracking branch 'upstream/sycl' into remove_devicelib_ji…
jinge90 5b342be
revert unrelated format change
jinge90 e52bb98
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 7e5ce78
Merge remote-tracking branch 'origin/sycl' into remove_devicelib_jit_…
jinge90 6d29439
Merge remote-tracking branch 'upstream/sycl' into remove_devicelib_ji…
jinge90 1de7396
Resolve conflicts with latest code
jinge90 444847a
Merge remote-tracking branch 'upstream/sycl' into remove_devicelib_ji…
jinge90 28e0cd2
Merge remote-tracking branch 'upstream/sycl' into remove_devicelib_ji…
jinge90 3dfe0ba
Merge remote-tracking branch 'upstream/sycl' into remove_devicelib_ji…
jinge90 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| //===----- SYCLDeviceLibBF16.h - get SYCL devicelib required Info -----=-==// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #pragma once | ||
|
|
||
| namespace llvm { | ||
| class Function; | ||
| class Module; | ||
| bool isSYCLDeviceLibBF16Used(const Module &M); | ||
| bool isBF16DeviceLibFuncDecl(const Function &F); | ||
| } // namespace llvm |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| //==----- SYCLDeviceLibBF16.cpp - get SYCL BF16 devicelib required Info ----==// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
| // This file provides some utils to analyze whether user's device image does | ||
| // depend on sycl bfloat16 device library functions. | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "llvm/SYCLLowerIR/SYCLDeviceLibBF16.h" | ||
| #include "llvm/ADT/SmallVector.h" | ||
| #include "llvm/IR/Function.h" | ||
| #include "llvm/IR/Module.h" | ||
| #include "llvm/TargetParser/Triple.h" | ||
|
|
||
| static constexpr char DEVICELIB_FUNC_PREFIX[] = "__devicelib_"; | ||
|
|
||
| using namespace llvm; | ||
|
|
||
| static llvm::SmallVector<StringRef, 14> BF16DeviceLibFuncs = { | ||
| "__devicelib_ConvertFToBF16INTEL", | ||
| "__devicelib_ConvertBF16ToFINTEL", | ||
| "__devicelib_ConvertFToBF16INTELVec1", | ||
| "__devicelib_ConvertBF16ToFINTELVec1", | ||
| "__devicelib_ConvertFToBF16INTELVec2", | ||
| "__devicelib_ConvertBF16ToFINTELVec2", | ||
| "__devicelib_ConvertFToBF16INTELVec3", | ||
| "__devicelib_ConvertBF16ToFINTELVec3", | ||
| "__devicelib_ConvertFToBF16INTELVec4", | ||
| "__devicelib_ConvertBF16ToFINTELVec4", | ||
| "__devicelib_ConvertFToBF16INTELVec8", | ||
| "__devicelib_ConvertBF16ToFINTELVec8", | ||
| "__devicelib_ConvertFToBF16INTELVec16", | ||
| "__devicelib_ConvertBF16ToFINTELVec16", | ||
| }; | ||
|
|
||
| bool llvm::isSYCLDeviceLibBF16Used(const Module &M) { | ||
| if (!Triple(M.getTargetTriple()).isSPIROrSPIRV()) | ||
| return false; | ||
|
|
||
| for (auto Fn : BF16DeviceLibFuncs) { | ||
| Function *BF16Func = M.getFunction(Fn); | ||
| if (BF16Func && BF16Func->isDeclaration()) | ||
| return true; | ||
| } | ||
|
|
||
| return false; | ||
| } | ||
|
|
||
| bool llvm::isBF16DeviceLibFuncDecl(const Function &F) { | ||
| if (!F.isDeclaration() || !F.getName().starts_with(DEVICELIB_FUNC_PREFIX)) | ||
| return false; | ||
| for (auto BFunc : BF16DeviceLibFuncs) { | ||
| if (!F.getName().compare(BFunc)) | ||
| return true; | ||
| } | ||
|
|
||
| return false; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.