Onnx runtime set allocator#619
Merged
Merged
Conversation
…me backend. We register RedisModule Alloc and Free functions as onnx allocator, so that onnx is now using them in model create, delete and run. - The memory usage of onnx (via redis allocator) and the number of accesses to the allocator is saved as part of the module info (defined in redisai.c), under a new section named "ai_memory_info". These are exported to RedisAI as new fields in the RAI_LoadedBackend struct.
chayim
previously approved these changes
Feb 25, 2021
…t since onnx memory info is saved in redis' INFO report, that can be produced by calling the INFO MODULES command)
3b775bb to
67c40f8
Compare
2d6cde9 to
6626672
Compare
6626672 to
e404178
Compare
rafie
reviewed
Feb 25, 2021
rafie
reviewed
Feb 25, 2021
rafie
reviewed
Feb 25, 2021
rafie
suggested changes
Feb 25, 2021
rafie
left a comment
Contributor
There was a problem hiding this comment.
tests/module/Makefile should be replaced by a corresponding CMakeLists.txt.
DvirDukhan
reviewed
Feb 28, 2021
2285c68 to
5e4af41
Compare
Codecov Report
@@ Coverage Diff @@
## master #619 +/- ##
==========================================
+ Coverage 76.35% 76.71% +0.36%
==========================================
Files 41 41
Lines 6517 6519 +2
==========================================
+ Hits 4976 5001 +25
+ Misses 1541 1518 -23
Continue to review full report at Codecov.
|
3db8a1b to
f9e45ff
Compare
…I/RedisAI into OnnxRuntime_set_allocator
89fd4a3 to
049417e
Compare
DvirDukhan
reviewed
Mar 10, 2021
…I/RedisAI into OnnxRuntime_set_allocator
…I/RedisAI into OnnxRuntime_set_allocator
cd7c9d1 to
5972370
Compare
Extend tests to make a more precise check of the allocator usage.
5972370 to
f27405b
Compare
DvirDukhan
approved these changes
Mar 11, 2021
rafie
approved these changes
Mar 11, 2021
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.
Introduce an API that allows setting a custom allocator for onnxruntime backend. We register RedisModule Alloc and Free functions as onnx allocator, so that onnx is now using them in model create, delete and run.
The memory usage of onnx (via redis allocator) and the number of accesses to the allocator is saved as part of the module info (defined in redisai.c), under a new section named "ai_memory_info". These are exported to RedisAI as new fields in the RAI_LoadedBackend struct.