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