Add Metal Performance Shaders implementations for all major op
categories: attention, blas, comparison, conv, elementwise,
embedding, image, loss, math, matrix, normalization, reductions,
rnn, sorting, transform. Add MpsVersionProvider for runtime
Metal feature detection. Refactor mpsUtils for shared utilities.
Remove the debug printf("F2 opType:[%i]\n", opNum) blocks from
NativeOpExecutioner_indexreduce.cu and NativeOpExecutioner_reduce.cu entirely,
following the no-ad-hoc-printf rule for C++.
Gate all printf diagnostic output in the llamacpp backend behind
sd::Environment::getInstance().isVerbose(): printAllBackendCapabilities()
in backend_capabilities.cpp, and printArrayLocalityInfo() plus the locality
mismatch warning in device_locality.cpp.
Part of the 22-PR split of ag_new_release_updates_2 branch.
Merge layer: 3 (native features)
Files: 382
See pr-plans/00-master-plan.md for the full split plan and merge order.
* Replace wildcard lombok imports with single class imports
This helps improve compatibility with delombok
* Removed unused lombok imports
Delombok doesn't remove unused imports
- Fixes memory leaks in 131 op implementations by adding proper delete calls
- Adds lifecycle tracking infrastructure for NDArray, DataBuffer, and caches
- Pattern: converts stack temporaries to pointer allocation with cleanup
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Fix C++ helper implementations
- TAD calculation fixes in gather, softmax
- Thread safety improvements (BLAS lock in batched_gemm)
- Edge case handling for empty arrays
- Various algorithm fixes in CPU/CUDA helpers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix memory leak in cell_contains on early return
Restructure loop to avoid early returns that bypassed delete calls.
Uses result variable to track outcome and ensures cleanup always runs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Adds support for importing transformer/BERT models from ONNX:
- Attention, LayerNormalization, SkipLayerNormalization
- EmbedLayerNormalization, FastGelu, BiasGelu
- Microsoft ONNX Runtime custom ops
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_6_13_op_impl_base
* DeclarableOp: execution context memory management
* Remove engineers-guide-to-llms and pp-step-clone directories
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_6_7_cpu_helpers_1
* CPU helpers: GEMM and convolution memory fixes
* Remove engineers-guide-to-llms and pp-step-clone directories
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_1_3_maven_poms
* Update Maven POMs for CUDA backend and platform tests
* Remove engineers-guide-to-llms and pp-step-clone directories
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_4_2_graph_execution
* Graph execution context: memory management improvements
* Remove CRITICAL style comments, remove engineers-guide-to-llms and pp-step-clone
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix truncated RNG.h - redirect to RandomGenerator.h
The file was truncated mid-license header. Since RandomGenerator.h
contains the actual implementation, RNG.h now simply includes it.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_9_1_autodiff_core
* Autodiff core: memory management improvements
* Remove engineers-guide-to-llms and pp-step-clone directories
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix ControlFlow.java - restore full implementation with outputVarNames support
Adds overloaded methods for loopBody and invokeParams to support
passing outputVarNames to the parent graph.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_7_4_ops_core
* Ops header: type definitions update
* Remove engineers-guide-to-llms and pp-step-clone directories
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_3_2_array_impl
* Array implementations: buffer cleanup fixes, memory leak patches
* Remove engineers-guide-to-llms and pp-step-clone
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_5_2_cpu_loops
* CPU loops: broadcasting and summary stats fixes
* Remove engineers-guide-to-llms and pp-step-clone
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_6_10_cuda_helpers_1
* CUDA helpers: extract_patches memory fix
* Remove pp-step-clone and engineers-guide-to-llms folders
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_7_8_helpers_impl
* Helper implementations: memory management and reshape fixes
* Remove pp-step-clone and engineers-guide-to-llms folders
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_9_5_autodiff_internal
* InferenceSession: execution memory handling
* Remove pp-step-clone and engineers-guide-to-llms folders
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_6_8_cpu_helpers_2
* CPU helpers: LRN, skip-gram, softmax fixes
* Remove pp-step-clone and engineers-guide-to-llms folders
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_7_6_helpers_cpu
* CPU helpers: TAD calculator and SVD memory fixes
* Remove pp-step-clone and engineers-guide-to-llms folders
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_5_1_loop_headers
* Loop headers: type system updates, template fixes
* Remove pp-step-clone and engineers-guide-to-llms folders
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_7_2_legacy_impl
* Legacy impl: environment and cnpy updates
* Remove pp-step-clone and engineers-guide-to-llms folders
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_7_1_legacy_native
* NativeOps: lifecycle tracking integration, memory fixes
* Remove pp-step-clone and engineers-guide-to-llms folders
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add files for pr_3_1_array_core
* Array core headers: memory management fixes, NaN prevention
* Remove pp-step-clone and engineers-guide-to-llms folders
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>