WDRshadow commented on code in PR #2050:
URL: https://github.com/apache/systemds/pull/2050#discussion_r1676979385


##########
src/main/java/org/apache/sysds/runtime/controlprogram/caching/CacheableData.java:
##########
@@ -229,7 +229,7 @@ protected CacheableData(DataType dt, ValueType vt) {
                _uniqueID = _seq.getNextID();
                _cacheStatus = CacheStatus.EMPTY;
                _numReadThreads = 0;
-               _gpuObjects = DMLScript.USE_ACCELERATOR ? new HashMap<>() : 
null;
+               _gpuObjects = DMLScript.USE_ACCELERATOR ? new 
ConcurrentHashMap<>() : null;

Review Comment:
   When useing multi-GPU, the size of `_gpuObjects` is large than 2. Then the 
`ConcurrentModificationError` will be occered. Using `ConcurrentHashMap` could 
avoid this. Of corse there still some other ways to deal with it. But I think 
it's the best solusion to avoid copying an extra GPU memory.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@systemds.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to