parent
76aab75174
commit
5ee37a22eb
|
@ -413,7 +413,7 @@ public class CudaWorkspace extends Nd4jWorkspace {
|
|||
|
||||
@Override
|
||||
public String getUniqueId() {
|
||||
return "Workspace_" + getId();
|
||||
return "Workspace_" + getId() + "_" + Nd4j.getDeallocatorService().nextValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -62,7 +62,7 @@ public class CpuWorkspace extends Nd4jWorkspace implements Deallocatable {
|
|||
|
||||
|
||||
public String getUniqueId() {
|
||||
return "Workspace_" + getId();
|
||||
return "Workspace_" + getId() + "_" + Nd4j.getDeallocatorService().nextValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -93,9 +93,10 @@ public class CpuWorkspace extends Nd4jWorkspace implements Deallocatable {
|
|||
isInit.set(true);
|
||||
|
||||
|
||||
if (isDebug.get())
|
||||
//if (isDebug.get())
|
||||
log.info("Allocating [{}] workspace of {} bytes...", id, currentSize.get());
|
||||
|
||||
|
||||
workspace.setHostPointer(new PagedPointer(memoryManager.allocate(currentSize.get() + SAFETY_OFFSET, MemoryKind.HOST, true)));
|
||||
AllocationsTracker.getInstance().markAllocated(AllocationKind.WORKSPACE, 0, currentSize.get() + SAFETY_OFFSET);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue