gemma4: fix compiler error on metal (#15550)

On some systems, the metal runtime compiler is failing due to an
uninitialized variable from #15378.

Fixes #15548
This commit is contained in:
Daniel Hiltgen
2026-04-13 11:32:00 -07:00
committed by GitHub
parent 4d75f5da03
commit ec29ce4ce3
7 changed files with 17 additions and 14 deletions

View File

@@ -7122,7 +7122,7 @@ kernel void kernel_rope_multi(
const int sec_w012 = args.sect_0 + args.sect_1 + args.sect_2; // end of section 2
const int sector = ic % sect_dims;
float theta_base;
float theta_base = 0.0;
if (FC_rope_is_imrope) {
if (sector % 3 == 1 && sector < 1 + 3 * args.sect_1) { // h
theta_base = (float) pos[i2 + args.ne02 * 1];

View File

@@ -4300,7 +4300,7 @@ kernel void kernel_rope_multi(
const int sec_w012 = args.sect_0 + args.sect_1 + args.sect_2; // end of section 2
const int sector = ic % sect_dims;
float theta_base;
float theta_base = 0.0;
if (FC_rope_is_imrope) {
if (sector % 3 == 1 && sector < 1 + 3 * args.sect_1) { // h
theta_base = (float) pos[i2 + args.ne02 * 1];