This PR represents a significant overhaul of the Tensor class within the project, introducing several optimizations and new features to enhance performance and functionality. Additionally, it introduces a new library downloader package to streamline the installation process for required shared libraries.
What's New:
Overhaul Tensor Buffer Implementation: The Tensor class has been revamped to utilize OpenBlas and FFI, resulting in improved performance and efficiency.
New Tensor Methods: Several new methods, including topk, divide, and slice, have been added to the Tensor class, along with corresponding changes to existing implementations to leverage these methods.
Refactor Stack Method: The stack method in the Tensor class has been refactored for enhanced performance.
Allow Normal PHP Buffer with Inference Session: Updates have been made to allow the Tensor class to work seamlessly with the InferenceSession, enabling easier integration with other components.
Move Thumbnail Method: The thumbnail method has been relocated from the feature extractor to the Image class for improved organization.
Code Cleanup and Style Review: The codebase has undergone cleanup and style review to ensure consistency and readability.
Optimize Image and Tensor Conversion: Efforts have been made to optimize the speed of conversion between Image and Tensor objects, enhancing overall performance.
Standardize Image Driver Setting: The setting of the image driver has been standardized for consistency across the project.
Custom FFI Integration: A custom FFI has been implemented, facilitating easier conversion of Tensor objects to ONNX Tensors by simplifying memory copying.
Add Proper Types for InferenceSession: Proper types have been introduced for the InferenceSession class to improve code clarity and maintainability.
Introduce Libraries Downloader Package: A new library downloader package has been introduced to automate the downloading of required shared libraries, such as onnxruntime, openblas, and rindow-matlib, during the Composer install process.
Summary:
This PR marks a significant milestone in enhancing the performance and functionality of the Tensor class while introducing convenient tools to streamline the installation of essential dependencies. These improvements not only optimize existing operations but also pave the way for future enhancements and expanded capabilities within the project.
Description:
This PR represents a significant overhaul of the Tensor class within the project, introducing several optimizations and new features to enhance performance and functionality. Additionally, it introduces a new library downloader package to streamline the installation process for required shared libraries.
What's New:
Summary:
This PR marks a significant milestone in enhancing the performance and functionality of the Tensor class while introducing convenient tools to streamline the installation of essential dependencies. These improvements not only optimize existing operations but also pave the way for future enhancements and expanded capabilities within the project.