Files
leleka/scripts/cuda-stubs/mma.h
T
Pavlo RatushnyiandClaude Sonnet 5.5 2ab3a8ca48 test(cuda): run the stub pass through clang's CUDA frontend (host/device call legality, __shared__ rules, <<<>>>); fix qsa variants block_q4_0 packing, de-duplicate native_head_native.cu
- check-cu.py now defaults to clang -x cuda --cuda-host-only with real qualifiers; --plain keeps the C++-only pass.
- qsa_prompt_attention_variants.cu: block_q4_0 under pack(1) as in kv_q4.hpp (cu_pin refreshed).
- native_head_native.cu: orphan copy had __launch_bounds__ before extern "C" __global__ (never nvcc-built); now the sealed twin's text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:56:45 +02:00

21 lines
989 B
C++

// Stub of <mma.h> (nvcuda::wmma): fragment types only, enough for declarations to parse.
#pragma once
#include "cuda_stub.h"
#if defined(__CUDA__)
#pragma clang force_cuda_host_device begin
#endif
namespace nvcuda { namespace wmma {
struct row_major {}; struct col_major {};
struct matrix_a {}; struct matrix_b {}; struct accumulator {};
enum layout_t { mem_row_major, mem_col_major };
template <class Use, int M, int N, int K, class T, class Layout = void> struct fragment { T x[16]; int num_elements = 16; };
template <class F, class T> void fill_fragment(F&, const T&);
template <class F, class T> void load_matrix_sync(F&, const T*, unsigned);
template <class F, class T> void load_matrix_sync(F&, const T*, unsigned, layout_t);
template <class T, class F> void store_matrix_sync(T*, const F&, unsigned, layout_t);
template <class D, class A, class B, class C> void mma_sync(D&, const A&, const B&, const C&);
} }
#if defined(__CUDA__)
#pragma clang force_cuda_host_device end
#endif