Skip to content

Commit 0fc675d

Browse files
committed
Small fix
Signed-off-by: amochalo <anastasiya.mochalova@intel.com>
1 parent 29c858a commit 0fc675d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sycl/test/inline-asm/include/asmhelper.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,15 @@ bool isInlineASMSupported(sycl::device Device) {
9999
/// \returns false if test wasn't launched (i.e.was skipped) and true otherwise
100100
template <typename F>
101101
bool launchInlineASMTest(F &f, bool requires_particular_sg_size = true) {
102+
cl::sycl::queue deviceQueue(cl::sycl::gpu_selector{});
103+
cl::sycl::device device = deviceQueue.get_device();
104+
102105
#if !defined(INLINE_ASM)
103-
if (!isInlineASMSupported(device)) {
106+
if (!isInlineASMSupported(device)) {
104107
std::cout << "Skipping test\n";
105108
return false;
106109
}
107110
#endif
108-
cl::sycl::queue deviceQueue(cl::sycl::gpu_selector{});
109-
cl::sycl::device device = deviceQueue.get_device();
110111

111112
if (requires_particular_sg_size && !device.has_extension("cl_intel_required_subgroup_size")) {
112113
std::cout << "Skipping test\n";

0 commit comments

Comments
 (0)