Repository navigation
0.5.0: one class per array library (ArrayLibrary family); devices as values; conversion records - #12
Merged
Merged
Conversation
…d operations MemoryType becomes a view generated from the registered library classes. Devices are Device values (HOST, AcceleratorDevice, NamedDevice); is_gpu and the CPU/GPU type sets are gone. Conversion routes are a registered ordered family whose one predicate answers the planned mechanism and selects the route. Work in progress: tests and docs not yet updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 0.5.0 A library without main-memory arrays (CuPy) cannot wrap a host buffer, so that pair is planned and run as a host copy instead of a DLPack attempt that fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…new libraries Tests are regrouped by what they test (libraries, devices, conversion, memory type, toy library) with shared fake modules; tests of deleted modules are removed. Adds the toy-library test (one class gives lookup, MemoryType member, decorator and conversion), the light-import and plan-without-devices subprocess tests, and conversion record and counter tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
What
Each supported array library is one class of one family,
arraybridge.libraries.ArrayLibrary. The class states the library's identity and owns its devices, data movement, streams, DLPack, out-of-memory recognition, child-process environment and native array operations.FrameworkRuntime, the ~60_<library>_<capability>functions, the positional-tupleMemoryTypemembers and the parallelArrayOperationsfamily are gone; what several libraries share is a parent class (HostDevices,AcceleratorDevices,CudaLibrary,DLPackImport,DLPackProtocolExport,NvidiaWheelLibraries,MutableArrays).MemoryTypeis a view: an Enum generated from the registered library classes, no behaviour,MemoryType.X.libraryfor the library object. A library defined later appears as a member.HOST,AcceleratorDevice(i),NamedDevice(name));is_gpuand the CPU/GPU type sets are removed. torch, JAX and TensorFlow have a host device.arraybridge.conversion:ConversionRoute(ordered registered family; one predicate answers the planned mechanism and selects the route),ConversionRecord,ConversionObserver(off by default),ConversionCounters.typing.Anyin the package (278 before).Arrayis a nominal ABC with native classes registered when first met.framework_config,framework_ops,converters_registry,dtype_scaling,gpu_cleanup,oom_recovery,array_operationsare deleted with no aliases.CHANGELOG.mdlists every removed name and its replacement.Checked
warn_return_anyis turned off: optional libraries are not importable by the checker, so what their modules return has no static type.Not checked
TensorFlow, JAX and pyclesperanto paths ran only against fake modules (and JAX on CPU): their accelerator code is a port of the 0.4.1 functions and was not run on a device. The host-device paths for JAX and TensorFlow are new and ran only on fakes.
🤖 Generated with Claude Code