mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-11-17 17:38:18 +08:00
CUDA 13.4 samples update - v13.4-public
Release 13.4 of the CUDA Samples supported by CUDA Toolkit 13.4. See Changelog for more information.
This commit is contained in:
@@ -197,14 +197,6 @@ def main():
|
||||
3. Unified memory with cuda.core.ManagedMemoryResource
|
||||
4. Kernel launch with cuda.core.launch and LaunchConfig
|
||||
"""
|
||||
if sys.platform == "win32":
|
||||
print(
|
||||
"This sample relies on ManagedMemoryResource with concurrent host "
|
||||
"access, which is not supported on Windows "
|
||||
"(concurrent_managed_access=False). Waiving this sample."
|
||||
)
|
||||
sys.exit(2)
|
||||
|
||||
print("=" * 60)
|
||||
print("Image Blur with Unified Memory (cuda.core)")
|
||||
print("=" * 60)
|
||||
@@ -213,6 +205,13 @@ def main():
|
||||
device = Device(0)
|
||||
device.set_current()
|
||||
|
||||
# This sample builds host NumPy views over managed memory. Devices without
|
||||
# concurrent managed access keep managed allocations GPU-exclusive while
|
||||
# the GPU is active, so those host views fault.
|
||||
if not device.properties.concurrent_managed_access:
|
||||
print("Concurrent managed memory access is not supported on this platform.")
|
||||
sys.exit(2)
|
||||
|
||||
print(f"\nDevice: {device.name}")
|
||||
print(f"Compute Capability: sm_{device.arch}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user