Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] Remove host run and dependencies from SYCL/InvokeSimd tests #1213

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions SYCL/InvokeSimd/invoke_simd_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,14 @@ template <class SimdElemT>
}

class ESIMDSelector : public device_selector {
// Require GPU device unless HOST is requested in SYCL_DEVICE_FILTER env
// Require GPU device
virtual int operator()(const device &device) const {
if (const char *dev_filter = getenv("SYCL_DEVICE_FILTER")) {
std::string filter_string(dev_filter);
if (filter_string.find("gpu") != std::string::npos)
return device.is_gpu() ? 1000 : -1;
if (filter_string.find("host") != std::string::npos)
return device.is_host() ? 1000 : -1;
std::cerr
<< "Supported 'SYCL_DEVICE_FILTER' env var values are 'gpu' and "
"'host', '"
<< "Supported 'SYCL_DEVICE_FILTER' env var values is 'gpu' and '"
<< filter_string << "' does not contain such substrings.\n";
return -1;
}
Expand Down
7 changes: 2 additions & 5 deletions SYCL/InvokeSimd/invoke_simd_smoke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,14 @@ ESIMD_CALLEE(float *A, esimd::simd<float, VL> b, int i) SYCL_ESIMD_FUNCTION {
float SPMD_CALLEE(float *A, float b, int i) { return A[i] + b; }

class ESIMDSelector : public device_selector {
// Require GPU device unless HOST is requested in SYCL_DEVICE_FILTER env
// Require GPU device
virtual int operator()(const device &device) const {
if (const char *dev_filter = getenv("SYCL_DEVICE_FILTER")) {
std::string filter_string(dev_filter);
if (filter_string.find("gpu") != std::string::npos)
return device.is_gpu() ? 1000 : -1;
if (filter_string.find("host") != std::string::npos)
return device.is_host() ? 1000 : -1;
std::cerr
<< "Supported 'SYCL_DEVICE_FILTER' env var values are 'gpu' and "
"'host', '"
<< "Supported 'SYCL_DEVICE_FILTER' env var values is 'gpu' and '"
<< filter_string << "' does not contain such substrings.\n";
return -1;
}
Expand Down