Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: memory leak in
model.predictImageSet
. (intel-analytics#2557)
* fix: memory leak in `model.predictImageSet`. There're three reasons of memory leak. 1. repeat allocations in bigquant, which will be fixed in BigDL-core. 2. repeat clone module but no release. `model.predictImageSet` will new Predictor again and again. 2. share weights. This patch add a `StorageManager` which contains a concurrent hash map to maintain all allocations of native memory/resources and prevent duplicate release. It's also helpful for debug. * fix: delete . * refator: as the API for AbstractModule * fix: distribute predictor memory leak * fix: move delete operation to ModelBroadcast * refinement per review * fix ut * fix scala version issue
- Loading branch information