Skip to content

Building metal kernels emits noisy warning / note, 126 times at present. #4670

Closed

Description

@jrp2014

Since #3161 (1-bit affine quantization) I think, building the Metal kernels (from source) emits the same warning once per qmv_fast_impl instantiation, 126 in total:

mlx/backend/metal/kernels/quantized.h:933:67: warning: comparison of integers of different signs: 'unsigned int' and 'const constant int' [-Wsign-compare]
    bool in_bounds = (aligned_end + simd_lid * values_per_thread) < in_vec_size;

simd_lid is uint, so the left side is promoted to unsigned. All values are non-negative here, so the result is correct; it's just noise in a -Wall -Wextra build that hides real warnings.

Possible one-line fix:

bool in_bounds =
    (aligned_end + static_cast<int>(simd_lid) * values_per_thread) < in_vec_size;

Environment: macOS 27, Xcode 27, M5 Max, building from main.

Activity

  1. zcbenz commented on Oct 10, 2026

    @zcbenz
    Member

    I noticed it too, please feel free to create a PR for your fix.

  2. zcbenz commented on Oct 12, 2026

    @zcbenz
    Member

    Closed by #4675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions