mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-10-22 03:48:19 +02:00
cuda : use SIMT implicit GEMM conv2d on AMD without WMMA (llama/30325)
* cuda : use SIMT implicit GEMM conv2d on AMD without WMMA Assisted-by: Claude Opus * cuda : update conv2d SIMT comment * cuda : skip SIMT conv2d on AMD for short reductions Co-authored-by: thelittlefireman <5165783+thelittlefireman@users.noreply.github.com> --------- Co-authored-by: thelittlefireman <5165783+thelittlefireman@users.noreply.github.com>
This commit is contained in:
co-authored by
thelittlefireman
parent
900f40e1a2
commit
8242e50cc6
@@ -378,8 +378,8 @@ void ggml_cuda_op_conv2d(ggml_backend_cuda_context & ctx, ggml_tensor * dst) {
|
||||
const auto & device = ggml_cuda_info().devices[ctx.device];
|
||||
const bool use_mma =
|
||||
turing_mma_available(device.cc) || amd_wmma_available(device.cc) || amd_mfma_available(device.cc);
|
||||
// MUSA can share the tiling without a native fragment implementation in mma.cuh.
|
||||
const bool use_simt = GGML_CUDA_CC_IS_MTHREADS(device.cc);
|
||||
// Devices without a native fragment implementation in mma.cuh can share the tiling.
|
||||
const bool use_simt = GGML_CUDA_CC_IS_MTHREADS(device.cc) || (GGML_CUDA_CC_IS_AMD(device.cc) && !use_mma && IC * KW * KH >= 64);
|
||||
const bool pointwise = KW == 1 && KH == 1 && ST_X == 1 && ST_Y == 1 && PD_X == 0 && PD_Y == 0;
|
||||
const bool use_blas = pointwise && fast_fp16_hardware_available(device.cc);
|
||||
// Short reductions on small maps do not amortize conversion and launch costs.
|
||||
|
||||
Reference in New Issue
Block a user