Skip to content

Conversation

@xctan
Copy link
Collaborator

@xctan xctan commented Jul 27, 2025

This PR cleans up redundant fallback implementations in each architecture, which were introduced in the previous refactor PR #13892.

@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Jul 27, 2025
@ggerganov ggerganov requested a review from slaren July 28, 2025 06:02
@slaren slaren requested a review from Copilot July 28, 2025 15:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes redundant scalar fallback implementations from architecture-specific code that were added in a previous refactor, replacing them with calls to generic implementations. The cleanup eliminates duplicated scalar computation code across different CPU architectures while maintaining the same functionality through centralized generic fallback functions.

Key changes:

  • Replaced architecture-specific scalar implementations with calls to generic functions
  • Added UNUSED macros to silence compiler warnings for variables no longer used in fallback paths
  • Maintained existing optimized vectorized code paths while cleaning up fallback implementations

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ggml/src/ggml-cpu/arch/x86/repack.cpp Replaced scalar implementations with generic function calls for quantization and matrix operations
ggml/src/ggml-cpu/arch/x86/quants.c Removed duplicated scalar fallback code for vector dot product operations
ggml/src/ggml-cpu/arch/wasm/quants.c Cleaned up scalar implementations in WebAssembly-specific code
ggml/src/ggml-cpu/arch/s390/quants.c Removed redundant scalar fallbacks in s390 architecture code
ggml/src/ggml-cpu/arch/riscv/repack.cpp Simplified RISC-V repack operations by using generic implementations
ggml/src/ggml-cpu/arch/riscv/quants.c Restructured conditional compilation and removed scalar duplications
ggml/src/ggml-cpu/arch/powerpc/quants.c Eliminated redundant scalar code in PowerPC architecture implementation

@slaren slaren merged commit db16e28 into ggml-org:master Jul 28, 2025
47 checks passed
Nexesenex added a commit to Nexesenex/croco.cpp that referenced this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants