code: public void clear() {
          int deviceId = Nd4j.getAffinityManager().getDeviceForCurrentThread();
          try {
              locksMap.get(deviceId).writeLock().lock();
              backingMap.remove(deviceId);
          } finally {
              locksMap.get(deviceId).writeLock().unlock();
          }
      }
docs: This method removes object stored for current device