-
Notifications
You must be signed in to change notification settings - Fork 781
[Driver][SYCL][FPGA] Improve expected triple and link behaviors for A… #1549
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
bader
merged 7 commits into
intel:sycl
from
mdtoguchi:private/mdtoguchi/fpga-fsycl-link-lin-win
Apr 21, 2020
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c23a03e
[Driver][SYCL][FPGA] Improve expected triple and link behaviors for A…
mdtoguchi e3a9200
[NFC] Update AOCX tests to improve shared source usage
mdtoguchi 7a5cfd2
[NFC] Adjust test to use assertion
mdtoguchi d720fa4
[SYCL][Driver][FPGA] When unbundling aocx, match up the appropriate t…
mdtoguchi e2808b0
[NFC] Additional test updates to split out -coff and non-coff checks.
mdtoguchi 1d7bce5
[NFC] Update test to check that no additional unbundle is done agains…
mdtoguchi 813ebcb
Apply review suggestions for timezone's sake
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//==--------------- fpga_device.cpp - AOT compilation for fpga -------------==// | ||
// | ||
// 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 | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "CL/sycl.hpp" | ||
|
||
using namespace cl::sycl; | ||
|
||
const double big[] = {3, 2, 1, 5, 6, 7}; | ||
void foo(double &result, queue q, int x) { | ||
buffer<double> buf(&result, 1); | ||
buffer<double, 1> big_buf(big, sizeof(big) / sizeof(double)); | ||
q.submit([&](handler &cgh) { | ||
auto acc = buf.get_access<access::mode::discard_write>(cgh); | ||
auto big_acc = big_buf.get_access<access::mode::read>(cgh); | ||
cgh.single_task<class test>([=]() { | ||
acc[0] = big_acc[x]; | ||
}); | ||
}); | ||
} |
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,23 @@ | ||
//==--------------- fpga_host.cpp - AOT compilation for fpga ---------------==// | ||
// | ||
// 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 | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "CL/sycl.hpp" | ||
#include <cassert> | ||
|
||
using namespace cl::sycl; | ||
|
||
void foo(double &, queue q, int x); | ||
|
||
int main(void) { | ||
queue q(accelerator_selector{}); | ||
|
||
double result; | ||
foo(result, q, 3); | ||
assert(result == 5); | ||
return 0; | ||
} |
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,24 @@ | ||
//==--- fpga_aocx_win.cpp - AOT compilation for fpga using aoc with aocx ---==// | ||
AGindinson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// | ||
// 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 | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// REQUIRES: aoc, accelerator | ||
// REQUIRES: system-windows | ||
|
||
/// E2E test for AOCX creation/use/run for FPGA | ||
// Produce an archive with device (AOCX) image | ||
// RUN: %clang_cl -fsycl -fintelfpga -fsycl-link=image %S/Inputs/fpga_device.cpp -o %t_image.lib | ||
// Produce a host object | ||
// RUN: %clang_cl -fsycl -fintelfpga -DHOST_PART %S/Inputs/fpga_host.cpp -c -o %t.obj | ||
|
||
// AOCX with source | ||
// RUN: %clang_cl -fsycl -fintelfpga -DHOST_PART %S/Inputs/fpga_host.cpp %t_image.lib -o %t_aocx_src.out | ||
// AOCX with object | ||
// RUN: %clang_cl -fsycl -fintelfpga %t.obj %t_image.lib -o %t_aocx_obj.out | ||
// | ||
// RUN: env SYCL_DEVICE_TYPE=ACC %t_aocx_src.out | ||
// RUN: env SYCL_DEVICE_TYPE=ACC %t_aocx_obj.out |
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.