File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -68,17 +68,11 @@ struct ur_device_handle_t_ {
68
68
}
69
69
70
70
// Max size of memory object allocation in bytes.
71
- // The minimum value is max(min(1024 × 1024 ×
72
- // 1024, 1/4th of CL_DEVICE_GLOBAL_MEM_SIZE),
73
- // 32 × 1024 × 1024) for devices that are not of type
74
- // CL_DEVICE_TYPE_CUSTOM.
75
- size_t Global = 0 ;
76
- UR_CHECK_ERROR (cuDeviceTotalMem (&Global, cuDevice));
77
-
78
- auto QuarterGlobal = static_cast <uint32_t >(Global / 4u );
79
-
80
- MaxAllocSize = std::max (std::min (1024u * 1024u * 1024u , QuarterGlobal),
81
- 32u * 1024u * 1024u );
71
+ // The minimum value is max (1/4th of info::device::global_mem_size,
72
+ // 128*1024*1024) if this SYCL device is not device_type::custom.
73
+ // CUDA doesn't really have this concept, and could allow almost 100% of
74
+ // global memory in one allocation, but is dependent on device usage.
75
+ UR_CHECK_ERROR (cuDeviceTotalMem (&MaxAllocSize, cuDevice));
82
76
}
83
77
84
78
~ur_device_handle_t_ () { cuDevicePrimaryCtxRelease (CuDevice); }
You can’t perform that action at this time.
0 commit comments