File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
backends/vulkan/runtime/api Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 6
6
* LICENSE file in the root directory of this source tree.
7
7
*/
8
8
9
+ // NOLINTBEGIN(clang-diagnostic-missing-field-initializers)
10
+
9
11
#include < executorch/backends/vulkan/runtime/api/Adapter.h>
10
12
11
13
#include < bitset>
Original file line number Diff line number Diff line change @@ -228,7 +228,14 @@ vTensor::vTensor(
228
228
memory_layout_,
229
229
gpu_sizes_,
230
230
dtype_,
231
- allocate_memory)) {}
231
+ allocate_memory)) {
232
+ if (dtype == api::kHalf ) {
233
+ VK_CHECK_COND (
234
+ api::context ()->adapter_ptr ()->has_16bit_storage (),
235
+ " Half dtype is only available if the physical device supports float16 "
236
+ " storage buffers!" );
237
+ }
238
+ }
232
239
233
240
vTensor::vTensor (
234
241
api::Context* const context,
You can’t perform that action at this time.
0 commit comments