-
Notifications
You must be signed in to change notification settings - Fork 130
[PI][OpenCL] Test support for exposing compute slices #1530
base: intel
Are you sure you want to change the base?
Conversation
This test tries to identify devices at three levels - root, sub, and sub-sub. For a device at a given level, checks are provided to see if there is more than 1 device at its sub-level. This test is expected to run without crashing for all backends, though it is specifically added to test changes in OpenCL plugin. Signed-off-by: Arvind Sudarsanam <[email protected]>
/verify with intel/llvm#7963 |
Signed-off-by: Arvind Sudarsanam <[email protected]>
#if __clang_major__ > 15 | ||
#include <sycl/sycl.hpp> | ||
#else | ||
#include <CL/sycl.hpp> | ||
inline namespace cl { | ||
using namespace sycl; | ||
} | ||
namespace sycl = ::cl::sycl; | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't do that - the test-suite is tied with the compiler.
std::cout << "Exception: " << e.what() << std::endl; | ||
std::fflush(stdout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://en.cppreference.com/w/cpp/io/manip/endl
Inserts a newline character into the output sequence os and flushes it as if by calling os.put(os.widen('\n')) followed by os.flush().
#include <cstring> | ||
namespace { | ||
void readEnvStringWithDefault(const char *name, char *value, const char *def) { | ||
char *tmp = std::getenv(name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't set any env variable in RUN lines, so I don't see how it is applicable to this test.
if (subdevice_partition_properties[i] == | ||
sycl::info::partition_property:: | ||
ext_intel_partition_by_cslice) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how the test fails without the OpenCL plugin implementation.
} | ||
} | ||
} | ||
} | ||
break; | ||
} else { | ||
devices.push_back(device); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we somehow restructure the code to avoid this?
This test tries to identify devices at three levels - root, sub, and sub-sub. For a device at a given level, checks are provided to see if there is more than 1 device at its sub-level. This test is expected to run without crashing for all backends, though it is specifically added to test changes in OpenCL plugin.
Impl: intel/llvm#7963
Signed-off-by: Arvind Sudarsanam [email protected]