Skip to content
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

Major memory control refactoring #199

Merged
merged 16 commits into from
Sep 2, 2024
Merged

Major memory control refactoring #199

merged 16 commits into from
Sep 2, 2024

Conversation

dmitriyb
Copy link
Collaborator

  1. Added option for manual array allocation control
  2. Allocator storage refactoring for less memory consumption and faster access
  3. Controlling mechanisms enhanced, including timed cache clearing
  4. Abandoning array wrapper structures in favor of working with raw primitive arrays

…sm from special function referencing to simple output copying.
…y management: use of primitive arrays directly.
…ling: streamlined array type handling and improved memory limit checks within create and reset methods; KIModel predict improved for NoAllocator case.
…ling: added new type for limiter which works with manually managed ndarrays, added manual ndarray handling in Attention and TensorExtensions, moved to use standard DataType enum instead of ArrayTypes.
…ling

Added manual NDArray handling, refactored existing operations to use standard DataType enum instead of ArrayTypes, and optimized memory allocations across multiple modules.
Replaced static method calls with instance method calls for NDArray storage wrappers. Introduced internal storage fields in `ManualAllocatorContext` to streamline access and management of different data types.
Deleted obsolete memory storage and allocator context classes. Added new classes with improved manual and auto handling storage for arrays, enhancing memory management and performance.
… for better primitive types handling: this solution gives less double primitive array allocations when Array<Any> changes to actual type.
…ve handling in primitive array storage classes.
…constants, removed commented-out and redundant code.
…phic, merge ParallelismLimiterContext and its thread limiter behavior into PredictionContext.
…n block handling (avoid Integer boxing operations).
@dmitriyb dmitriyb merged commit 0d7094f into master Sep 2, 2024
10 checks passed
@dmitriyb dmitriyb deleted the JBAI-4393-memory-control branch September 2, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants