Skip to content

Commit

Permalink
[SYCL] Adding back props
Browse files Browse the repository at this point in the history
Signed-off-by: Hu, Peisen <[email protected]>
  • Loading branch information
HPS-1 committed Jan 29, 2025
1 parent b8a0668 commit 92fd3c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ int main() try {
auto *DeviceStorage = sycl::malloc_shared<storage_t>(1, q);
sycl::range R{1024};

constexpr oneapi::properties props{oneapi::assume_indirect_calls};
for (size_t TestCase = 0; TestCase < 2; ++TestCase) {
std::vector<int> HostData(R.size());
std::iota(HostData.begin(), HostData.end(), 0);
Expand All @@ -87,7 +88,7 @@ int main() try {

q.submit([&](sycl::handler &CGH) {
sycl::accessor DataAcc(DataStorage, CGH, sycl::read_write);
CGH.parallel_for(R, KernelFunctor(DeviceStorage, DataAcc));
CGH.parallel_for(R, props, KernelFunctor(DeviceStorage, DataAcc));
});

BaseOp *Ptr = HostStorage.construct</* ret type = */ BaseOp>(TestCase);
Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/VirtualFunctions/misc/range-non-uniform-vf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ int main() try {
auto *DeviceStorage = sycl::malloc_shared<storage_t>(3, q);
sycl::range R{1024};

constexpr oneapi::properties props{oneapi::assume_indirect_calls};
{
std::vector<float> HostData(R.size());
for (size_t I = 1; I < HostData.size(); ++I)
Expand All @@ -85,7 +86,7 @@ int main() try {

q.submit([&](sycl::handler &CGH) {
sycl::accessor DataAcc(DataStorage, CGH, sycl::read_write);
CGH.parallel_for(R, KernelFunctor(DeviceStorage, DataAcc));
CGH.parallel_for(R, props, KernelFunctor(DeviceStorage, DataAcc));
});

BaseOp *Ptr[] = {HostStorage[0].construct</* ret type = */ BaseOp>(0),
Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/VirtualFunctions/misc/range-uniform-vf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ int main() try {
auto *DeviceStorage = sycl::malloc_shared<storage_t>(1, q);
sycl::range R{1024};

constexpr oneapi::properties props{oneapi::assume_indirect_calls};
for (unsigned TestCase = 0; TestCase < 3; ++TestCase) {
std::vector<float> HostData(R.size());
for (size_t I = 1; I < HostData.size(); ++I)
Expand All @@ -81,7 +82,7 @@ int main() try {

q.submit([&](sycl::handler &CGH) {
sycl::accessor DataAcc(DataStorage, CGH, sycl::read_write);
CGH.parallel_for(R, KernelFunctor(DeviceStorage, DataAcc));
CGH.parallel_for(R, props, KernelFunctor(DeviceStorage, DataAcc));
});

auto *Ptr = HostStorage.construct</* ret type = */ BaseOp>(TestCase);
Expand Down

0 comments on commit 92fd3c5

Please sign in to comment.