Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2020-06-08 18:16:10 +0300
committerPatrick Mours <pmours@nvidia.com>2020-06-08 18:55:49 +0300
commit9f7d84b656fbb56966620ecc249ce5bc7089a1d1 (patch)
treed0a022feae43f6db2166cf5214b56cce99b96a60 /intern/cycles/device/device.h
parent0a907657d4d525d320e0c8518f583b7210736214 (diff)
Cycles: Add support for P2P memory distribution (e.g. via NVLink)
This change modifies the multi-device implementation to support memory distribution across devices, to reduce the overall memory footprint of large scenes and allow scenes to fit entirely into combined GPU memory that previously had to fall back to host memory. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7426
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r--intern/cycles/device/device.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index c55dfb3a83b..dff981080a5 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -82,6 +82,7 @@ class DeviceInfo {
bool has_osl; /* Support Open Shading Language. */
bool use_split_kernel; /* Use split or mega kernel. */
bool has_profiling; /* Supports runtime collection of profiling info. */
+ bool has_peer_memory; /* GPU has P2P access to memory of another GPU. */
int cpu_threads;
vector<DeviceInfo> multi_devices;
vector<DeviceInfo> denoising_devices;
@@ -99,6 +100,7 @@ class DeviceInfo {
has_osl = false;
use_split_kernel = false;
has_profiling = false;
+ has_peer_memory = false;
}
bool operator==(const DeviceInfo &info)
@@ -435,6 +437,17 @@ class Device {
{
}
+ virtual bool is_resident(device_ptr /*key*/, Device *sub_device)
+ {
+ /* Memory is always resident if this is not a multi device, regardless of whether the pointer
+ * is valid or not (since it may not have been allocated yet). */
+ return sub_device == this;
+ }
+ virtual bool check_peer_access(Device * /*peer_device*/)
+ {
+ return false;
+ }
+
/* static */
static Device *create(DeviceInfo &info,
Stats &stats,