1 /* 2 * Copyright (c) Meta Platforms, Inc. and affiliates. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. 7 */ 8 9 #pragma once 10 11 #include <executorch/backends/vulkan/runtime/api/api.h> 12 13 #include <string> 14 15 namespace vkcompute { 16 17 constexpr size_t kShaderNameReserve = 64u; 18 19 void add_storage_type_suffix( 20 std::string& kernel_name, 21 const utils::StorageType storage_type); 22 void add_storage_type_suffix( 23 std::string& kernel_name, 24 const api::vTensor& tensor); 25 26 void add_dtype_suffix(std::string& kernel_name, const vkapi::ScalarType dtype); 27 void add_dtype_suffix(std::string& kernel_name, const api::vTensor& tensor); 28 29 void add_ndim_suffix(std::string& kernel_name, const size_t ndim); 30 void add_ndim_suffix(std::string& kernel_name, const api::vTensor& tensor); 31 32 void add_packed_dim_suffix(std::string& kernel_name, const int32_t packed_dim); 33 void add_packed_dim_suffix( 34 std::string& kernel_name, 35 const api::vTensor& tensor); 36 37 } // namespace vkcompute 38