Gpu inference#406
Merged
Merged
Conversation
The ALS model was spinning for ever when trying to train with more than 2^31 interactions. This was caused by using 32 bit ints in the cython code which overflowed. Fix.
Add gpu methods for recommend/rank_items/similar_items, by using cupy arrays to store the factors and do the inference computations. This change also splits the cpu/gpu code bases entirely - so the existing numpy code won't work on the gpu factors.
Add gpu methods for recommend/rank_items/similar_items, by using cupy arrays to store the factors and do the inference computations. This change also splits the cpu/gpu code bases entirely - so the existing numpy code won't work on the gpu factors.
Closed
|
This adds cupy as a dependency for GPU runs. However, it has to be installed separately to avoid blocking CPU users or do a CUDA conditional install |
Owner
Author
|
@tRosenflanz - I've removed the cupy dependency here #458 , and have accelerated the inference code further in #460. GPU inference is currently 40x faster on my system for querying a single user at a time. Getting better times than this will require batch inference on the GPU - which I will get to in a future release. |
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.
Add gpu methods for recommend/rank_items/similar_items, by using cupy arrays
to store the factors and do the inference computations. This change also
splits the cpu/gpu code bases entirely - so the existing numpy code won't
work on the gpu factors.