use of org.nd4j.jita.conf.DeviceInformation in project nd4j by deeplearning4j.
the class AtomicAllocatorTest method setUp.
@Before
public void setUp() throws Exception {
DataTypeUtil.setDTypeForContext(DataBuffer.Type.FLOAT);
if (allocator == null) {
Configuration configuration = new Configuration();
// configuration.setHostDeallocAggressiveness(Aggressiveness.IMMEDIATE);
configuration.setMaximumSingleHostAllocation(5000);
configuration.setMaximumZeroAllocation(1000000000);
// singleDevice4GBcc52 = new CudaEnvironment(configuration);
DeviceInformation device1 = new DeviceInformation();
device1.setDeviceId(0);
device1.setCcMajor(5);
device1.setCcMinor(2);
device1.setTotalMemory(4 * 1024 * 1024 * 1024L);
device1.setAvailableMemory(4 * 1024 * 1024 * 1024L);
// singleDevice4GBcc52.addDevice(device1);
allocator = AtomicAllocator.getInstance();
// allocator.applyConfiguration(configuration);
// allocator.setEnvironment(singleDevice4GBcc52);
// allocator.setMemoryHandler(new CudaZeroHandler());
}
}
Aggregations