Skip to content

Commit afe7dd5

Browse files
mtavenrathMinh141120
authored andcommitted
Add support for VK_EXT_debug_utils to add labels to Vulkan objects. (ggml-org#13792)
* Add support for VK_EXT_debug_utils to add labels to Vulkan objects. In step 1 compute pipelines are getting labeled. * remove #ifdef for debug utils and add queue marker.
1 parent 634cf89 commit afe7dd5

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

ggml/src/ggml-vulkan/ggml-vulkan.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3675,6 +3675,9 @@ static void ggml_vk_instance_init() {
36753675

36763676
}
36773677

3678+
size_t num_available_devices = vk_instance.instance.enumeratePhysicalDevices().size();
3679+
vk_perf_logger_enabled = getenv("GGML_VK_PERF_LOGGER") != nullptr;
3680+
36783681
// Emulate behavior of CUDA_VISIBLE_DEVICES for Vulkan
36793682
char * devices_env = getenv("GGML_VK_VISIBLE_DEVICES");
36803683
if (devices_env != nullptr) {
@@ -10154,15 +10157,9 @@ static bool ggml_backend_vk_device_supports_op(ggml_backend_dev_t dev, const ggm
1015410157
ggml_type src0_type = op->src[0]->type;
1015510158
ggml_backend_vk_device_context * ctx = (ggml_backend_vk_device_context *)dev->context;
1015610159
const vk_device& device = ggml_vk_get_device(ctx->device);
10157-
if (op->op == GGML_OP_MUL_MAT_ID) {
10158-
if (!device->mul_mat_id_s[src0_type] && !device->mul_mat_id_m[src0_type] && !device->mul_mat_id_l[src0_type]) {
10159-
// If there's not enough shared memory for row_ids and the result tile, fallback to CPU
10160-
return false;
10161-
}
10162-
// Check against size of shared memory variable
10163-
if (op->src[2]->ne[0] > 4096) {
10164-
return false;
10165-
}
10160+
if (op->op == GGML_OP_MUL_MAT_ID && !device->mul_mat_id_s[src0_type] && !device->mul_mat_id_m[src0_type] && !device->mul_mat_id_l[src0_type]) {
10161+
// If there's not enough shared memory for row_ids and the result tile, fallback to CPU
10162+
return false;
1016610163
}
1016710164
switch (src0_type) {
1016810165
case GGML_TYPE_F32:

0 commit comments

Comments
 (0)