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

Memory restrictions and limited parallelism for model prediction #196

Merged
merged 10 commits into from
Jul 31, 2024

Conversation

dmitriyb
Copy link
Collaborator

No description provided.

…ith a platform-limited version based on Default Dispatcher, ResourcesDispatcher prevents unlimited creation of AllocatorContext (this behavior caused OOM).
# Conflicts:
#	ndarray/ndarray-core/src/jvmMain/kotlin/io/kinference/ndarray/arrays/memory/ArrayDispatcher.kt
#	ndarray/ndarray-core/src/jvmMain/kotlin/io/kinference/ndarray/arrays/memory/MemoryLimiter.kt
#	ndarray/ndarray-core/src/jvmMain/kotlin/io/kinference/ndarray/arrays/memory/ModelArrayStorage.kt
…lt limiter for the 0.3 of the max heap size, NoAllocator limiter when user doesn't want to reuse any allocated arrays.
…ead of KIEngine. Standard close() function always clears model cache.
… commonMain and move to jvm specific ConcurrentLinkedQueue without expect/actual.
@dmitriyb dmitriyb requested a review from cupertank July 25, 2024 16:45
…ate parameter names: default limiter is now NoAllocator, better naming for deducting memory and for size in bytes for arrays.
…er logic: added MemoryLimiter to ArrayStorage constructor for better memory control. Removed isNewlyCreated flag from ArrayContainer and streamlined getArrayContainers logic in AllocatorContext.
@dmitriyb dmitriyb requested a review from cupertank July 30, 2024 12:20
@dmitriyb dmitriyb merged commit c83a315 into master Jul 31, 2024
10 checks passed
@dmitriyb dmitriyb deleted the optimize-coroutines branch July 31, 2024 09:18
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