Advertisement
UF6

OpenCL Finder

UF6
Jan 13th, 2025
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. import pyopencl as cl
  2.  
  3. def list_opencl_devices():
  4.     platforms = cl.get_platforms()
  5.     for platform in platforms:
  6.         print(f"Platform: {platform.name}")
  7.         devices = platform.get_devices()
  8.         for device in devices:
  9.             print(f"  Device: {device.name}, Type: {device.type}")
  10.            
  11. list_opencl_devices()
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement