-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a vector engine #4925
Add a vector engine #4925
Conversation
The dag.Vectorize node tells the compiler to execute its body using the vector engine.
Tests in runtime/vcache/ztests/ are broken because "zed dev vcache copy" no longer works. I'd like to fix it rather than disable the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge when tests pass.
We're going to fix "zed dev vcache copy" (and "zed dev vcache project", which is also broken) later, so I've disabled the corresponding tests. |
Do that by plugging some holes left by #4925. * In runtime/vcache/ztests/, re-enable skipped "zed dev vcache copy" tests. * In cmd/zed/dev/vcache/copy.Command.Run, resurrect the call to zio.Copy. * In package runtime/vcache: * Resurrect the Reader type and update its Read method. * Resurrect Object.NewReader. * Add loader type to hold the *zed.Context needed when loading a vector of type values and convert existing loadXXX functions to loader methods. * In loadArray, fix bad nil argument to loadVector. * In loadMap, load lengths vector. * In loadNulls, create slots slice and load values vector. * In loadPrimitive, remove null handling (vector.Nulls now does that) and add support for missing Zed types (float16, float32, float64, bytes, ip, net, and type). * In loadRecord, load all fields when no specific path is requested. * In loadUnion, load tags vector. * In loadVector, assign to *any when loading a constant vector. * In package vector: * Add missing Byte, Float, IP, Net, and Type types. * Add missing length field to Map type. * Add missing tags field to Union type. * Implement NewBuilder method for Array, Map, and Union types. * Handle nulls for all vector types by replacing the Nullmask type with Nulls, which wraps a vector.Any.
Do that by plugging some holes left by #4925. * In runtime/vcache/ztests/, re-enable skipped "zed dev vcache copy" tests. * In cmd/zed/dev/vcache/copy.Command.Run, resurrect the call to zio.Copy. * In package runtime/vcache: * Resurrect the Reader type and update its Read method. * Resurrect Object.NewReader. * Add loader type to hold the *zed.Context needed when loading a vector of type values. * Convert existing loadXXX functions to loader methods. * In loadArray, fix bad nil argument to loadVector. * In loadMap, load lengths vector. * In loadNulls, create slots slice and load values vector. * In loadPrimitive, remove null handling (vector.Nulls now does that) and add support for missing Zed types (float16, float32, float64, bytes, ip, net, and type). * In loadRecord, load all fields when no specific path is requested. * In loadUnion, load tags vector. * In loadVector, assign to *any when loading a constant vector. * In package vector: * Add missing Byte, Float, IP, Net, and Type types. * Add missing length field to Map type. * Add missing tags field to Union type. * Implement NewBuilder method for Array, Map, and Union types. * Handle nulls for all vector types by replacing the Nullmask type with Nulls, which wraps a vector.Any.
Do that by plugging some holes left by #4925. * In runtime/vcache/ztests/, re-enable skipped "zed dev vcache copy" tests. * In cmd/zed/dev/vcache/copy.Command.Run, resurrect the call to zio.Copy. * In package runtime/vcache: * Resurrect the Reader type and update its Read method. * Resurrect Object.NewReader. * Add loader type to hold the *zed.Context needed when loading a vector of type values. * Convert existing loadXXX functions to loader methods. * In loadArray, fix bad nil argument to loadVector. * In loadMap, load lengths vector. * In loadNulls, create slots slice and load values vector. * In loadPrimitive, remove null handling (vector.Nulls now does that) and add support for missing Zed types (float16, float32, float64, bytes, ip, net, and type). * In loadRecord, load all fields when no specific path is requested. * In loadUnion, load tags vector. * In loadVector, assign to *any when loading a constant vector. * In package vector: * Add missing Byte, Float, IP, Net, and Type types. * Add missing length field to Map type. * Add missing tags field to Union type. * Implement NewBuilder method for Array, Map, and Union types. * Handle nulls for all vector types by replacing the Nullmask type with Nulls, which wraps a vector.Any.
Add a vector engine in compiler/vam (for vector abstract machine) with a few initial operations
Add dag.Vectorize, which tells the compiler to execute operations in its body using the vector engine
Add compiler/optimize.Optimizer.Vectorize, which identifies a very limited set of vectorizable operations and wraps them in dag.Vectorize
Add complier/kernel.Builder.compileVectorize, which compiles dag.Vectorize
Co-authored-by: @mccanne