Conversation
…tions The GPU_ACCELERATED strategy was removed from the Strategy enum in a previous cleanup pass. The GpuAcceleratedFunc lambda parameter was retained in dispatch_utils.h under a (void) cast for ABI compatibility. This removes it entirely: - dispatch_utils.h: drop GpuAcceleratedFunc template parameter from autoDispatch, executeWithStrategy, and executeStrategy; remove the (void)gpu_accelerated_func no-op; update doc comments; add reference to issue #23 for future GPU backend design rationale - All 9 distribution files: remove the 5th (GPU) lambda argument from every autoDispatch and executeWithStrategy call site (42 lambdas removed across beta, chi_squared, discrete, exponential, gamma, gaussian, poisson, student_t, uniform) No behaviour change: the GPU lambda was unreachable code (the Strategy enum had no GPU_ACCELERATED value). chi_squared has no batch dispatch lambdas (it delegates to gamma_) and was unaffected. Note: the build shim at build/include_shim/ is a cmake-configure-time copy of include/; editing headers and running make directly requires either a cmake re-run or a manual cp of the changed header to the shim. Closes #23 (issue tracks future GPU backend prerequisites) Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the dead GPU dispatch slot that was left as unreachable code after
GPU_ACCELERATEDwas dropped from theStrategyenum. GPU dispatch was abandoned due to platform ISA fragmentation (Metal / CUDA / Vulkan) and a dependency on the table-driven dispatch refactor planned in Phase 5/7. The design rationale and prerequisites for any future GPU backend are captured in issue #23.Changes
include/core/dispatch_utils.hGpuAcceleratedFunctemplate parameter andgpu_accelerated_funcargument fromautoDispatch,executeWithStrategy, andexecuteStrategy(void)gpu_accelerated_funcno-opAll 9 distribution files (beta, chi_squared, discrete, exponential, gamma, gaussian, poisson, student_t, uniform)
autoDispatchandexecuteWithStrategycall site — 42 GPU lambdas deleted, 1,704 lines removedchi_squaredhas no batch dispatch (delegates togamma_) and was unaffectedNo behaviour change
The GPU lambda slot was unreachable: the
Strategyenum had noGPU_ACCELERATEDvalue andexecuteStrategywas already discarding the argument via(void). This is a pure dead-code removal.Build note
The CMake build shim (
build/include_shim/) is populated at configure time viacopy_directory. Editing a header and runningmakedirectly requires either acmakere-run or a manualcpof the changed header to the shim. This was discovered during this PR and is documented in the commit message.Testing
Closes #23
Conversation: https://app.warp.dev/conversation/aed97ef4-35cf-4a9d-ab39-264b97f3c2f4
Co-Authored-By: Oz oz-agent@warp.dev