Conversation
…benchmark panic fix - Float32: SetDefaultDType, dtype.go, matmulV2Float32, ops Float32 support - Scheduler: ParallelFor scales with GOMAXPROCS, tests with -race - MatMul v2: block sizes 32/64, mc=64 kc=128, ≥40% faster on 1024×1024 - Workspace pool for matmulV2, reduced alloc/op - Guards in matmulV2/gebp/microKernel4x4, numChunks vs slots, avoid panic - BLAS nocgo: real impls, Float32, error handling; Transpose Float32 in matmul Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Added Float32/Float64 support via dtype.go with SetDefaultDType to switch the default data type globally. Implemented cache-blocked MatMul v2 with block sizes 32/64 (mc=64, kc=128) and a 4x4 microkernel - at least 40% faster on 1024x1024 matrices. Added ParallelFor scheduler that scales with GOMAXPROCS and passes -race tests. Added workspace pool for matmulV2 to reduce allocations. Created pkg/tensor/ops package with Max, Sub, Div functions for autograd compatibility. Added tests for dtype, matmul v2, and scheduler.
Fixed blas_nocgo.go to have real BLAS implementations instead of stubs, with Float32 support and proper error handling. Fixed Float32 support in MatMulTransposeB and MatMulTransposeA. Removed Forward method from the Operation interface in graph/node.go, keeping only Backward. Fixed CallbackList pointer dereference in train/config.go. Fixed benchmark panic caused by out-of-bounds access in matmulV2, gebp, and microKernel4x4 by adding proper bounds guards on numChunks and slots.