|
16 | 16 |
|
17 | 17 | using namespace cl::sycl;
|
18 | 18 |
|
| 19 | +// platform::has() calls device::has() for each device on the platform. |
| 20 | + |
19 | 21 | int main() {
|
20 | 22 | bool failed = false;
|
21 | 23 | int pltIdx = 0;
|
@@ -64,57 +66,6 @@ int main() {
|
64 | 66 | if (plt.has(aspect::queue_profiling)) {
|
65 | 67 | std::cout << " queue profiling" << std::endl;
|
66 | 68 | }
|
67 |
| - |
68 |
| - int devIdx = 0; |
69 |
| - for (const auto &dev : plt.get_devices()) { |
70 |
| - devIdx++; |
71 |
| - if (dev.has(aspect::host)) { |
72 |
| - if ((!dev.has(aspect::image)) || (!dev.has(aspect::online_compiler)) || |
73 |
| - (!dev.has(aspect::online_linker)) || |
74 |
| - (!dev.has(aspect::queue_profiling))) { |
75 |
| - failed = true; |
76 |
| - std::cout << "Failed: device #" << devIdx << " type: host" |
77 |
| - << std::endl; |
78 |
| - } |
79 |
| - } else if (dev.has(aspect::cpu)) { |
80 |
| - if ((!dev.has(aspect::fp64)) || |
81 |
| - (!dev.has(aspect::int64_base_atomics)) || |
82 |
| - (!dev.has(aspect::int64_extended_atomics)) || |
83 |
| - (!dev.has(aspect::image)) || (!dev.has(aspect::online_compiler)) || |
84 |
| - (!dev.has(aspect::online_linker)) || |
85 |
| - (!dev.has(aspect::queue_profiling))) { |
86 |
| - failed = true; |
87 |
| - std::cout << "Failed: device #" << devIdx << " type: cpu" |
88 |
| - << std::endl; |
89 |
| - } |
90 |
| - } else if (dev.has(aspect::gpu)) { |
91 |
| - if ((!dev.has(aspect::fp16)) || (!dev.has(aspect::fp64)) || |
92 |
| - (!dev.has(aspect::int64_base_atomics)) || |
93 |
| - (!dev.has(aspect::int64_extended_atomics)) || |
94 |
| - (!dev.has(aspect::image)) || (!dev.has(aspect::online_compiler)) || |
95 |
| - (!dev.has(aspect::online_linker)) || |
96 |
| - (!dev.has(aspect::queue_profiling))) { |
97 |
| - failed = true; |
98 |
| - std::cout << "Failed: device #" << devIdx << " type: gpu" |
99 |
| - << std::endl; |
100 |
| - } |
101 |
| - } else if (dev.has(aspect::accelerator)) { |
102 |
| - if ((!dev.has(aspect::online_compiler)) || |
103 |
| - (!dev.has(aspect::online_linker)) || |
104 |
| - (!dev.has(aspect::queue_profiling))) { |
105 |
| - failed = true; |
106 |
| - std::cout << "Failed: device #" << devIdx << " type: gpu" |
107 |
| - << std::endl; |
108 |
| - } |
109 |
| - } else { |
110 |
| - failed = true; |
111 |
| - std::cout << "Failed: device #" << devIdx << " type: unknown" |
112 |
| - << std::endl; |
113 |
| - } |
114 |
| - } |
115 |
| - } |
116 |
| - if (failed) { |
117 |
| - return 1; |
118 | 69 | }
|
119 | 70 | std::cout << "Passed." << std::endl;
|
120 | 71 | return 0;
|
|
0 commit comments