From Niko1221/Strata tag v0.2.4 (commit 96ca4383, 2026-10-24), unmodified: src/dsv41/ (the engine and its vendored
EXL3 / sampler / window kernels), include/strata/dsv41/, tests/dsv41/, tools/dsv41/{pack_gguf,smoke,tune}.py,
data/dsv41/ (the shipped hot-expert profiles), tools/trellis/tqenc.{cpp,hpp} (the tests' encoder),
third_party/project-maya/ (the MIT notice: the engine is a port of Project Maya's maya-ds4),
third_party/ggml/ggml-common-tq.h, docs/DEEPSEEK41.md (upstream's text, to be rewritten for this fork).
src/kernels/cpu: upstream's iq_avx2.{cpp,hpp}, iq_avx2_rows.inl, iq_avx512.{cpp,hpp} replace this fork's
(v0.1.45-poly.1) copies - they add the engine's CPU lane rows iq256x_rows / iq512x_rows and leave the main engine's
iq256_* / iq512_* as they were (upstream's statement; iq_avx2_parity is the check) - and the trellis CPU lane
tq_cpu.{hpp,cpp}, tq_avx2.cpp, tq_avx512.cpp, tq_states.hpp, tq_computed.hpp is new. expert_layout.hpp stays at
layout version 4 (upstream's 5 adds Hadamard-folded packs this fork has no use for yet).
CMakeLists.txt: upstream's strata-dsv41 block, with ggml.h / ggml-cpu.h coming through strata_kernels_cpu's ggml-cpu
link from the submodule (no FetchContent), the tq sources and flags in strata_kernels_cpu, and iq_avx512.cpp built
with -mavx512vpopcntdq -mbmi2 as upstream does (iq512x_rows uses them). Makefile: STRATA_BUILD_DSV41=ON and
strata-dsv41 among the targets `make build` produces.
Target: ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF (IQ1_M / IQ2_XXS + the IQ4_NL Engram) on the A6000 VM.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
51 lines
2.0 KiB
C
51 lines
2.0 KiB
C
// Copyright (c) 2026 Peasant Smith and the Project Maya contributors (MIT; https://github.com/mw00/project-maya, v1.1.17).
|
|
// Ported into Strata (third_party/project-maya/NOTICE.md, LICENSE); changes are in the git history of this file.
|
|
// include/strata/dsv41/hip_extra.h - CUDA runtime names the DeepSeek-V4.1 engine path uses that Strata's HIP shim
|
|
// (include/strata/hip_compat) does not map. Force-included into the dsv41 targets only, so no other target changes.
|
|
// The mappings are Project Maya's include/strata/hip_compat (MIT, third_party/project-maya/NOTICE.md).
|
|
#pragma once
|
|
#include <hip/hip_runtime.h>
|
|
#include <hipblas/hipblas.h>
|
|
#ifndef __grid_constant__
|
|
#define __grid_constant__
|
|
#endif
|
|
#ifndef cudaDevAttrMemoryClockRate
|
|
#define cudaDevAttrMemoryClockRate hipDeviceAttributeMemoryClockRate
|
|
#endif
|
|
#ifndef cudaDevAttrGlobalMemoryBusWidth
|
|
#define cudaDevAttrGlobalMemoryBusWidth hipDeviceAttributeMemoryBusWidth
|
|
#endif
|
|
#ifndef cudaDevAttrCanUseHostPointerForRegisteredMem
|
|
#define cudaDevAttrCanUseHostPointerForRegisteredMem hipDeviceAttributeCanUseHostPointerForRegisteredMem
|
|
#endif
|
|
#ifndef cudaDeviceGetPCIBusId
|
|
#define cudaDeviceGetPCIBusId hipDeviceGetPCIBusId
|
|
#endif
|
|
#ifndef cudaDeviceGetStreamPriorityRange
|
|
#define cudaDeviceGetStreamPriorityRange hipDeviceGetStreamPriorityRange
|
|
#endif
|
|
#ifndef cudaOccupancyMaxActiveBlocksPerMultiprocessor
|
|
#define cudaOccupancyMaxActiveBlocksPerMultiprocessor hipOccupancyMaxActiveBlocksPerMultiprocessor
|
|
#endif
|
|
#ifndef cudaErrorUnknown
|
|
#define cudaErrorUnknown hipErrorUnknown
|
|
#endif
|
|
#ifndef cudaErrorInvalidConfiguration
|
|
#define cudaErrorInvalidConfiguration hipErrorInvalidConfiguration
|
|
#endif
|
|
#ifndef cudaMemcpy2D
|
|
#define cudaMemcpy2D hipMemcpy2D
|
|
#endif
|
|
#ifndef cudaStreamCreateWithPriority
|
|
#define cudaStreamCreateWithPriority hipStreamCreateWithPriority
|
|
#endif
|
|
#ifndef cudaStreamLegacy
|
|
#define cudaStreamLegacy hipStreamLegacy
|
|
#endif
|
|
#ifndef CUBLAS_GEMM_DEFAULT_TENSOR_OP
|
|
#define CUBLAS_GEMM_DEFAULT_TENSOR_OP HIPBLAS_GEMM_DEFAULT
|
|
#endif
|
|
#ifndef cudaDataType
|
|
#define cudaDataType hipDataType
|
|
#endif
|