-
Notifications
You must be signed in to change notification settings - Fork 789
[SYCL] Add support for new FPGA function attribute stall_enable #2734
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
14 commits
Select commit
Hold shift + click to select a range
099a093
[SYCL] Add support for new FPGA function attribute stall_enable
smanna12 7bcc2a0
[SYCL] update patches
smanna12 9a6413d
[SYCL] Fix Clang-format issues
smanna12 e08afc1
address review comment
smanna12 08b4e78
Update patches
smanna12 9198720
Fix Clang format issues
smanna12 f8bea40
Address review comment
smanna12 4271118
Address review comments
smanna12 63eeda7
update doc
smanna12 6eb62f5
Address review comments
smanna12 3a648b8
Update patch and address review comments
smanna12 af28ae1
Fix Clang-fromat issues
smanna12 d12bd0a
Remove redundant test
smanna12 f6ab893
Update doc
smanna12 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
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
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,26 @@ | ||
// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s | ||
|
||
#include "sycl.hpp" | ||
|
||
using namespace cl::sycl; | ||
queue q; | ||
|
||
class Foo { | ||
public: | ||
[[intel::stall_enable]] void operator()() const {} | ||
}; | ||
|
||
int main() { | ||
q.submit([&](handler &h) { | ||
Foo f; | ||
h.single_task<class test_kernel1>(f); | ||
|
||
h.single_task<class test_kernel2>( | ||
[]() [[intel::stall_enable]]{}); | ||
}); | ||
return 0; | ||
} | ||
|
||
// CHECK: define spir_kernel void @"{{.*}}test_kernel1"() #0 {{.*}} !stall_enable ![[NUM5:[0-9]+]] | ||
// CHECK: define spir_kernel void @"{{.*}}test_kernel2"() #0 {{.*}} !stall_enable ![[NUM5]] | ||
// CHECK: ![[NUM5]] = !{i32 1} |
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,38 @@ | ||
// RUN: %clang_cc1 %s -fsyntax-only -fsycl -internal-isystem %S/Inputs -fsycl-is-device -Wno-sycl-2017-compat -DTRIGGER_ERROR -verify | ||
// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -ast-dump -Wno-sycl-2017-compat %s | FileCheck %s | ||
|
||
#include "sycl.hpp" | ||
|
||
using namespace cl::sycl; | ||
queue q; | ||
|
||
[[intel::stall_enable]] void test() {} //expected-warning{{'stall_enable' attribute ignored}} | ||
|
||
#ifdef TRIGGER_ERROR | ||
[[intel::stall_enable(1)]] void bar1() {} // expected-error{{'stall_enable' attribute takes no arguments}} | ||
[[intel::stall_enable]] int N; // expected-error{{'stall_enable' attribute only applies to functions}} | ||
#endif | ||
|
||
struct FuncObj { | ||
[[intel::stall_enable]] void operator()() const {} | ||
}; | ||
|
||
int main() { | ||
q.submit([&](handler &h) { | ||
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel1 | ||
// CHECK: SYCLIntelStallEnableAttr {{.*}} | ||
h.single_task<class test_kernel1>( | ||
FuncObj()); | ||
|
||
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel2 | ||
// CHECK: SYCLIntelStallEnableAttr {{.*}} | ||
h.single_task<class test_kernel2>( | ||
[]() [[intel::stall_enable]]{}); | ||
|
||
// CHECK-LABEL: FunctionDecl {{.*}}test_kernel3 | ||
// CHECK-NOT: SYCLIntelStallEnableAttr {{.*}} | ||
h.single_task<class test_kernel3>( | ||
[]() { test(); }); | ||
}); | ||
return 0; | ||
} |
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.