anv: only expose VK_KHR_cooperative_matrix on devices with hw instructions.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Currently anv exposes this on lots of devices, with the intent to be better
than apps can give, but I think this is wrong for a couple of reasons.

Apps want to know if hw exposes the fast path, Vulkan is meant to be explicit,
and telling llama.cpp if the fast path exists lets it make smarter decisions.

It seems unless someone heavily optimises the slow path, that CPU is usually
faster than GPU with llama-bench unless the hw path exists.

v2: added INTEL_LOWER_DPAS support

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35564>
This commit is contained in:
Dave Airlie 2025-06-17 08:07:48 +10:00 committed by Marge Bot
parent 4cbbdc0a50
commit 29c599ffea

View file

@ -6681,7 +6681,7 @@ anv_device_utrace_emit_gfx_copy_buffer(struct u_trace_context *utctx,
static bool
anv_has_cooperative_matrix(const struct anv_physical_device *device)
{
return device->has_cooperative_matrix;
return device->has_cooperative_matrix && (device->info.has_systolic || debug_get_bool_option("INTEL_LOWER_DPAS", false));
}
#define ANV_FROM_HANDLE(__anv_type, __name, __handle) \