Skip to content

[BUG] Follow-up on #4396: later loads never apply a new cuda_workers / pool_intraop_threads; the typed API cannot reach several kernel fields; validation gaps #4448

Closed

Description

@Qubitium

Kind: incomplete fix of #4396 (551f861) plus related gaps in the #4364/#4375 API. Confirmed at 489aed6 on an RTX 4090 and CPU unless marked static.

1. The thread-pool resize checks only the CPU worker count (medium)

gptqmodel/__init__.py resize_device_thread_pool (about lines 555-593) compares only len(pool._worker_groups["cpu"]) against the target. cuda_workers (_default_cuda_workers) and pool_intraop_threads are read only when the pool is first built.

GPTQModel.load(M, quantize_config=QuantizeConfig(bits=4, runtime=RuntimeConfig(cuda_workers=1)))
#   pool {'cuda:0': 1, 'cpu': 12}
GPTQModel.load(M, quantize_config=QuantizeConfig(bits=4, runtime=RuntimeConfig(cuda_workers=3, cpu_workers=4)))
#   {'cuda:0': 3, 'cpu': 4}   <- rebuilt only because the cpu count changed
GPTQModel.load(M, quantize_config=QuantizeConfig(bits=4, runtime=RuntimeConfig(cuda_workers=2, cpu_workers=4)))
#   {'cuda:0': 3, ...}, while the policy reports cuda_workers=2

2. Fields the typed API cannot reach (low, static)

3. Typed options that do nothing (low)

  • MarlinConfig(fp32=False) has no effect on AWQ checkpoints. AwqMarlinLinear.forward (nn_modules/qlinear/marlin_awq.py:390-417) never passes use_fp32_reduce. Logits are bitwise identical for fp32 True and False on AWQ Llama-3.2-1B; GPTQ Marlin differs by 0.31. This predates the refactor, but the typed API now advertises the option.
  • The GGUFCUDAConfig fused settings are never read by GGUFCudaKernel.forward (gguf_cpp.py:1699). Static.

4. Validation gaps (low)


Found during an AI-assisted review (Claude Code, round 13) of 489aed6; repros were run at that commit (A/B against def6e61 where noted) on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions