Skip to content

Commit 878ea20

Browse files
committed
disable multi_add for Intel due to likely driver bug
1 parent 87ead86 commit 878ea20

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3571,6 +3571,7 @@ static vk_device ggml_vk_get_device(size_t idx) {
35713571
device->multi_add = vk12_props.shaderRoundingModeRTEFloat16 &&
35723572
device->properties.limits.maxPushConstantsSize >= sizeof(vk_op_multi_add_push_constants) &&
35733573
vk12_features.runtimeDescriptorArray &&
3574+
device->vendor_id != VK_VENDOR_ID_INTEL &&
35743575
getenv("GGML_VK_DISABLE_MULTI_ADD") == nullptr;
35753576

35763577
if (device->subgroup_size_control) {
@@ -10704,12 +10705,12 @@ static bool ggml_vk_can_fuse(const struct ggml_cgraph * cgraph, int node_idx, st
1070410705

1070510706
static uint32_t ggml_vk_fuse_multi_add(ggml_backend_vk_context * ctx, const struct ggml_cgraph * cgraph, int node_idx) {
1070610707

10707-
if (!ctx->device->multi_add) {
10708+
const ggml_tensor *first_node = cgraph->nodes[node_idx];
10709+
if (first_node->op != GGML_OP_ADD) {
1070810710
return 0;
1070910711
}
1071010712

10711-
const ggml_tensor *first_node = cgraph->nodes[node_idx];
10712-
if (first_node->op != GGML_OP_ADD) {
10713+
if (!ctx->device->multi_add) {
1071310714
return 0;
1071410715
}
1071510716

0 commit comments

Comments
 (0)