Skip to content

Commit b80a152

Browse files
mylerbb-sycl
authored andcommitted
level_zero_device_free_mem.cpp is not supported on integrated devices (intel#1355)
1 parent 584ec4e commit b80a152

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

SYCL/Plugin/level_zero_device_free_mem.cpp

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<<<<<<< HEAD
12
// REQUIRES: level_zero, level_zero_dev_kit
23
// UNSUPPORTED: gpu-intel-gen9, gpu-intel-gen12
34
// The query of free memory is not supported on integrated devices
@@ -31,3 +32,38 @@ int main() {
3132

3233
return 0;
3334
}
35+
=======
36+
// REQUIRES: level_zero, level_zero_dev_kit
37+
// UNSUPPORTED: gpu-intel-gen9, gpu-intel-gen12
38+
// The query of free memory is not supported on integrated devices
39+
//
40+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %level_zero_options %s -o %t.out
41+
// RUN: env ZES_ENABLE_SYSMAN=1 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER
42+
//
43+
// The test is to check that the free device memory is reported be Level Zero
44+
// backend
45+
//
46+
// CHECK: Free device memory
47+
48+
#include <iostream>
49+
#include <sycl/sycl.hpp>
50+
using namespace sycl;
51+
52+
int main() {
53+
54+
queue Queue;
55+
auto dev = Queue.get_device();
56+
std::cout << "Device: " << dev.get_info<info::device::name>() << std::endl;
57+
58+
if (!dev.is_host() && dev.has(aspect::ext_intel_free_memory)) {
59+
auto FreeMemory = dev.get_info<ext::intel::info::device::free_memory>();
60+
std::cout << "Free device memory: " << FreeMemory << std::endl;
61+
} else {
62+
std::cout
63+
<< "Query ext_intel_device_info_free_memory not supported by the device"
64+
<< std::endl;
65+
}
66+
67+
return 0;
68+
}
69+
>>>>>>> f681f3a03 (level_zero_device_free_mem.cpp is not supported on integrated devices (#1355))

0 commit comments

Comments
 (0)