public CudaGridExecutioner() { // extraz.set(new PointerPointer(10)); deviceQueues.set(new ArrayDeque<OpDescriptor>()); int numDevices = nativeOps.getAvailableDevices(); for (int x = 0; x < numDevices; x++) { aggregates.add(new ConcurrentLinkedQueue<AggregateDescriptor>()); } experimental.set(nativeOps.isExperimentalEnabled()); }
public CudaGridExecutioner() { // extraz.set(new PointerPointer(10)); deviceQueues.set(new ArrayDeque<OpDescriptor>()); int numDevices = nativeOps.getAvailableDevices(); for (int x = 0; x < numDevices; x++) { aggregates.add(new ConcurrentLinkedQueue<AggregateDescriptor>()); } experimental.set(nativeOps.isExperimentalEnabled()); }
/** * This method returns number of available devices in system. * * Please note: returned value might be different from actual number of used devices. * * @return total number of devices */ @Override public int getNumberOfDevices() { if (numberOfDevices.get() < 0) { synchronized (this) { if (numberOfDevices.get() < 1) { numberOfDevices.set(NativeOpsHolder.getInstance().getDeviceNativeOps().getAvailableDevices()); } } } return numberOfDevices.get(); }
/** * This method returns number of available devices in system. * * Please note: returned value might be different from actual number of used devices. * * @return total number of devices */ @Override public int getNumberOfDevices() { if (numberOfDevices.get() < 0) { synchronized (this) { if (numberOfDevices.get() < 1) { numberOfDevices.set(NativeOpsHolder.getInstance().getDeviceNativeOps().getAvailableDevices()); } } } return numberOfDevices.get(); }
for (int i = 0; i < nativeOps.getAvailableDevices(); i++) { Map<String, Object> deviceProps = new HashMap<>(); props.put(Nd4jEnvironment.CUDA_NUM_GPUS_KEY, nativeOps.getAvailableDevices()); props.put(Nd4jEnvironment.CUDA_DEVICE_INFORMATION_KEY, devicesList); props.put(Nd4jEnvironment.BLAS_VENDOR_KEY, Nd4jBlas.Vendor.CUBLAS.toString()); for (int i = 0; i < nativeOps.getAvailableDevices(); i++) { Map<String, Object> dev = devicesList.get(i); CudaPointer devPtr = new CudaPointer(i);
for (int i = 0; i < nativeOps.getAvailableDevices(); i++) { Map<String, Object> deviceProps = new HashMap<>(); props.put(Nd4jEnvironment.CUDA_NUM_GPUS_KEY, nativeOps.getAvailableDevices()); props.put(Nd4jEnvironment.CUDA_DEVICE_INFORMATION_KEY, devicesList); props.put(Nd4jEnvironment.BLAS_VENDOR_KEY, (Nd4j.factory().blas()).getBlasVendor().toString()); for (int i = 0; i < nativeOps.getAvailableDevices(); i++) { Map<String, Object> dev = devicesList.get(i); CudaPointer devPtr = new CudaPointer(i);
int availableProcessors = Runtime.getRuntime().availableProcessors(); NativeOps nativeOps = NativeOpsHolder.getInstance().getDeviceNativeOps(); int nDevices = nativeOps.getAvailableDevices();
int numDevices = NativeOpsHolder.getInstance().getDeviceNativeOps().getAvailableDevices(); for (int i = 0; i < numDevices; i++) { deviceAllocations.add(new ConcurrentHashMap<Long, Long>());
int numDevices = NativeOpsHolder.getInstance().getDeviceNativeOps().getAvailableDevices(); for (int i = 0; i < numDevices; i++) { deviceAllocations.add(new ConcurrentHashMap<Long, Long>());
long[] gpuMaxBytes = null; NativeOps nativeOps = NativeOpsHolder.getInstance().getDeviceNativeOps(); int nDevices = nativeOps.getAvailableDevices(); if (nDevices > 0) { gpuCurrentBytes = new long[nDevices];