Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/vllm/multimodal/speech_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ class SpeechEngine {
// is held through a `unique_ptr` or a `shared_ptr` everywhere in this tree, and
// a future copy would be a second engine sharing one lock's worth of nothing.
// A compile error at the seam is the right place to learn that.
SpeechEngine(const SpeechEngine&) = default;
SpeechEngine& operator=(const SpeechEngine&) = default;
SpeechEngine(SpeechEngine&&) = default;
SpeechEngine& operator=(SpeechEngine&&) = default;
SpeechEngine(const SpeechEngine&) = delete;
SpeechEngine& operator=(const SpeechEngine&) = delete;
SpeechEngine(SpeechEngine&&) = delete;
SpeechEngine& operator=(SpeechEngine&&) = delete;

private:
std::mutex synthesize_mutex_;
Expand Down
35 changes: 31 additions & 4 deletions scripts/build-windows-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ function Invoke-CrtAudit {
[Parameter(Mandatory)][string]$Server,
[scriptblock]$DumpbinRunner = {
param([string]$Mode, [string]$Path)
$output = & dumpbin $Mode $Path 2>&1
$output = & dumpbin /nologo $Mode $Path
if ($LASTEXITCODE -ne 0) {
throw "dumpbin $Mode failed for $Path with status $LASTEXITCODE"
}
Expand Down Expand Up @@ -749,6 +749,30 @@ foreach ($name in @("SOURCE_SHA", "VERSION", "EVIDENCE_URL", "SOURCE_DATE_EPOCH"
}
}

# The Visual Studio cmake generator finds cl.exe internally, but dumpbin
# is called directly by the CRT audit (line 845) and the PE inspection
# (line 935). It is not on PATH by default on windows-2022 runners, so
# locate it via vswhere and prepend its directory.
$vswhere = Join-Path ${env:ProgramFiles(x86)} "Microsoft Visual Studio\Installer\vswhere.exe"
if (Test-Path $vswhere) {
$vsInstall = & $vswhere -latest -property installationPath
if ($vsInstall) {
$msvcRoot = Join-Path $vsInstall "VC\Tools\MSVC"
if (Test-Path $msvcRoot) {
$dumpbinDir = Get-ChildItem -Path $msvcRoot -Directory |
Sort-Object Name -Descending | Select-Object -First 1 |
ForEach-Object { Join-Path $_.FullName "bin\Hostx64\x64" }
if ($dumpbinDir -and (Test-Path (Join-Path $dumpbinDir "dumpbin.exe"))) {
$env:PATH = "$dumpbinDir;$env:PATH"
}
}
}
}

if (-not (Get-Command dumpbin -ErrorAction SilentlyContinue)) {
throw "dumpbin.exe not found on PATH; CRT audit and PE inspection cannot run"
}

if (-not (Test-Path (Join-Path $SmokeModel "config.json"))) {
throw "Windows runtime smoke model is incomplete: $SmokeModel"
}
Expand Down Expand Up @@ -932,11 +956,11 @@ $absent = @{
}
} | ConvertTo-Json -Depth 8 | Set-Content -LiteralPath $tierReport -Encoding utf8NoBOM

$headerOutput = @(& dumpbin /nologo /headers $server 2>&1)
$headerOutput = @(& dumpbin /nologo /headers $server)
if ($LASTEXITCODE -ne 0) { throw "dumpbin /headers failed" }
$dependentOutput = @(& dumpbin /nologo /dependents $server 2>&1)
$dependentOutput = @(& dumpbin /nologo /dependents $server)
if ($LASTEXITCODE -ne 0) { throw "dumpbin /dependents failed" }
$rawOutput = @(& dumpbin /nologo /rawdata $server 2>&1)
$rawOutput = @(& dumpbin /nologo /rawdata $server)
if ($LASTEXITCODE -ne 0) { throw "dumpbin /rawdata failed" }
$machine = if (($headerOutput -join "`n") -match '(?im)^\s*(8664)\s+machine') { $Matches[1] } else { "" }
$imports = @(
Expand All @@ -954,7 +978,10 @@ $debugPaths = @(
imports = $imports; debug_paths = $debugPaths
} | ConvertTo-Json -Depth 4 | Set-Content -LiteralPath $peReport -Encoding utf8NoBOM

$savedEAP = $ErrorActionPreference
$ErrorActionPreference = 'Continue'
$compiler = (& cl 2>&1 | Select-Object -First 1) -join ""
$ErrorActionPreference = $savedEAP
$toolsetVersion = if ($env:VCToolsVersion) { $env:VCToolsVersion.TrimEnd('\') } else { throw "VCToolsVersion is required" }
$ucrtVersion = if ($env:UCRTVersion) { $env:UCRTVersion.TrimEnd('\') } else { throw "UCRTVersion is required" }
$abiVersion = ($toolsetVersion -split '\.')[0..1] -join '.'
Expand Down
9 changes: 9 additions & 0 deletions src/vllm/model_executor/models/gemma4_moe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,15 @@ Gemma4MoeScratch RunGemma4Moe(vt::Queue& q, const Gemma4MoeLayerWeights& moe,
ExpertGeGLUFp8Native(d, ysum, xin.t(), fex.dev_fp8_gu, fex.dev_s_gu, fex.dev_fp8_dn,
fex.dev_s_dn, I, H, esc, ww, beta);
fused_mix = true;
} else {
EnsureGemma4Fp8ExpertCached(fex, I, H);
if (!fex.cached_gu.empty() && !fex.cached_dn.empty()) {
ExpertGeGLUHost(d, y, xin.t(), fex.cached_gu.data(), fex.cached_dn.data(), I, H, esc,
&fex);
} else {
DequantGemma4Fp8ExpertToBf16Ephemeral(fex, I, H, gu_tmp.data(), dn_tmp.data());
ExpertGeGLUHost(d, y, xin.t(), gu_tmp.data(), dn_tmp.data(), I, H, esc, &fex);
}
}
} else if (need_peer_sc && gu_sc && dn_sc) {
if (PeerCopyGemma4ExpertSlice(ex.dev_id, ex.gate_up_dev, ex.down_dev, e, I, H,
Expand Down
2 changes: 1 addition & 1 deletion src/vllm/v1/core/kv_cache_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ int64_t host_available_memory_bytes() {
//
// Returns 0 when unreadable; callers treat 0 as "unknown" and do not refuse,
// because an unknown budget must not become a false refusal.
std::FILE* f = std::fopen("/proc/meminfo", "re");
std::FILE* f = std::fopen("/proc/meminfo", "r");
if (f == nullptr) return 0;
char line[256];
int64_t kb = 0;
Expand Down
10 changes: 5 additions & 5 deletions src/vt/cpu/cpu_matmul_elem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void Bt16Portable(const float* af, const void* bv, int64_t k, float* acc) {
for (int64_t p = 0; p < k; ++p) {
const float av = af[p];
for (int l = 0; l < kElemLanes; ++l) {
s[l] += av * E::Cvt(b[static_cast<int64_t>(l) * k + p]);
s[l] += av * E::Cvt(vt::LoadUnaligned<typename E::T>(b + static_cast<int64_t>(l) * k + p));
}
}
for (int l = 0; l < kElemLanes; ++l) acc[l] = s[l];
Expand Down Expand Up @@ -183,7 +183,7 @@ void Bt16Neon(const float* af, const void* bv, int64_t k, float* acc) {
for (; p < k; ++p) { // K tail, still in p order per lane
const float av = af[p];
for (int l = 0; l < kElemLanes; ++l) {
acc[l] += av * E::Cvt(b[static_cast<int64_t>(l) * k + p]);
acc[l] += av * E::Cvt(vt::LoadUnaligned<typename E::T>(b + static_cast<int64_t>(l) * k + p));
}
}
}
Expand Down Expand Up @@ -229,7 +229,7 @@ void BtM4Neon(const float* af, int64_t a_stride, const void* bv, int64_t k, floa
for (int r = 0; r < kMrNeon; ++r) {
const float av = af[r * a_stride + pt];
for (int l = 0; l < kElemLanes; ++l) {
acc[r * kElemLanes + l] += av * E::Cvt(b[static_cast<int64_t>(l) * k + pt]);
acc[r * kElemLanes + l] += av * E::Cvt(vt::LoadUnaligned<typename E::T>(b + static_cast<int64_t>(l) * k + pt));
}
}
}
Expand Down Expand Up @@ -328,7 +328,7 @@ void Bt16Sse2(const float* af, const void* bv, int64_t k, float* acc) {
for (; p < k; ++p) {
const float av = af[p];
for (int l = 0; l < kElemLanes; ++l) {
acc[l] += av * E::Cvt(b[static_cast<int64_t>(l) * k + p]);
acc[l] += av * E::Cvt(vt::LoadUnaligned<typename E::T>(b + static_cast<int64_t>(l) * k + p));
}
}
}
Expand Down Expand Up @@ -374,7 +374,7 @@ void BtM2Sse2(const float* af, int64_t a_stride, const void* bv, int64_t k, floa
for (int r = 0; r < kMrSse2; ++r) {
const float av = af[r * a_stride + pt];
for (int l = 0; l < kElemLanes; ++l) {
acc[r * kElemLanes + l] += av * E::Cvt(b[static_cast<int64_t>(l) * k + pt]);
acc[r * kElemLanes + l] += av * E::Cvt(vt::LoadUnaligned<typename E::T>(b + static_cast<int64_t>(l) * k + pt));
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/vt/cpu/cpu_matmul_elem_avx2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <cstdint>

#include "vt/dtype.h"
#include "vt/unaligned.h"
#include "cpu_matmul_elem.h"

namespace vt::cpu {
Expand Down Expand Up @@ -154,7 +155,7 @@ void Bt16Avx2(const float* af, const void* bv, int64_t k, float* acc) {
for (; p < k; ++p) {
const float av = af[p];
for (int l = 0; l < kElemLanes; ++l) {
acc[l] += av * ElemA<K>::Cvt(b[static_cast<int64_t>(l) * k + p]);
acc[l] += av * ElemA<K>::Cvt(vt::LoadUnaligned<typename ElemA<K>::T>(b + static_cast<int64_t>(l) * k + p));
}
}
}
Expand Down Expand Up @@ -228,7 +229,7 @@ void BtM4Avx2(const float* af, int64_t a_stride, const void* bv, int64_t k, floa
const float av = af[r * a_stride + p];
for (int l = 0; l < kElemLanes; ++l) {
acc[r * kElemLanes + l] +=
av * ElemA<K>::Cvt(b[static_cast<int64_t>(l) * k + p]);
av * ElemA<K>::Cvt(vt::LoadUnaligned<typename ElemA<K>::T>(b + static_cast<int64_t>(l) * k + p));
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/vt/cpu/cpu_matmul_elem_avx512.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <cstdint>

#include "vt/dtype.h"
#include "vt/unaligned.h"
#include "cpu_matmul_elem.h"

namespace vt::cpu {
Expand Down Expand Up @@ -118,7 +119,7 @@ void Bt16Avx512(const float* af, const void* bv, int64_t k, float* acc) {
for (; p < k; ++p) {
const float av = af[p];
for (int l = 0; l < kElemLanes; ++l) {
acc[l] += av * ElemZ<K>::Cvt(b[static_cast<int64_t>(l) * k + p]);
acc[l] += av * ElemZ<K>::Cvt(vt::LoadUnaligned<typename ElemZ<K>::T>(b + static_cast<int64_t>(l) * k + p));
}
}
}
Expand Down Expand Up @@ -174,7 +175,7 @@ void BtM6Avx512(const float* af, int64_t a_stride, const void* bv, int64_t k, fl
for (int r0 = 0; r0 < kMrAvx512; ++r0) {
const float av = af[r0 * a_stride + p];
for (int l = 0; l < kElemLanes; ++l) {
acc[r0 * kElemLanes + l] += av * ElemZ<K>::Cvt(b[static_cast<int64_t>(l) * k + p]);
acc[r0 * kElemLanes + l] += av * ElemZ<K>::Cvt(vt::LoadUnaligned<typename ElemZ<K>::T>(b + static_cast<int64_t>(l) * k + p));
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/vt/cpu/cpu_matmul_elem_f16c.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "vt/cpu/cpu_matmul_elem_f16c.h"

#include "vt/quant.h"
#include "vt/unaligned.h"

#include <immintrin.h>

Expand Down Expand Up @@ -49,7 +50,7 @@ void BtM2F16c(const float* af, int64_t a_stride, const void* bv, int64_t k,
const float av = af[r * a_stride + pt];
for (int lane = 0; lane < kElemLanes; ++lane) {
acc[r * kElemLanes + lane] +=
av * F16ToF32(b[static_cast<int64_t>(lane) * k + pt]);
av * F16ToF32(vt::LoadUnaligned<uint16_t>(b + static_cast<int64_t>(lane) * k + pt));
}
}
}
Expand Down Expand Up @@ -81,7 +82,7 @@ void Bt16F16c(const float* af, const void* bv, int64_t k, float* acc) {
for (; p < k; ++p) {
const float av = af[p];
for (int lane = 0; lane < kElemLanes; ++lane) {
acc[lane] += av * F16ToF32(b[static_cast<int64_t>(lane) * k + p]);
acc[lane] += av * F16ToF32(vt::LoadUnaligned<uint16_t>(b + static_cast<int64_t>(lane) * k + p));
}
}
}
Expand Down