Skip to content

Instantly share code, notes, and snippets.

@atinfinity
Created April 19, 2021 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atinfinity/05645e01435db55ba141ce2891dfe5ee to your computer and use it in GitHub Desktop.
Save atinfinity/05645e01435db55ba141ce2891dfe5ee to your computer and use it in GitHub Desktop.
clDeviceQuery(M1 MacBook)
clDeviceQuery Starting...

1 OpenCL Platforms found

 CL_PLATFORM_NAME: 	Apple
 CL_PLATFORM_VERSION: 	OpenCL 1.2 (Dec 21 2020 17:26:51)
OpenCL Device Info:

 1 devices found supporting OpenCL on: Apple

 ----------------------------------
 Device Apple M1
 ---------------------------------
  CL_DEVICE_NAME: 			Apple M1
  CL_DEVICE_VENDOR: 			Apple
  CL_DRIVER_VERSION: 			1.2 1.0
  CL_DEVICE_TYPE:			CL_DEVICE_TYPE_GPU
  CL_DEVICE_MAX_COMPUTE_UNITS:		8
  CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:	3
  CL_DEVICE_MAX_WORK_ITEM_SIZES:	256 / 256 / 256 
  CL_DEVICE_MAX_WORK_GROUP_SIZE:	256
  CL_DEVICE_MAX_CLOCK_FREQUENCY:	1000 MHz
  CL_DEVICE_ADDRESS_BITS:		64
  CL_DEVICE_MAX_MEM_ALLOC_SIZE:		1024 MByte
  CL_DEVICE_GLOBAL_MEM_SIZE:		10922 MByte
  CL_DEVICE_ERROR_CORRECTION_SUPPORT:	no
  CL_DEVICE_LOCAL_MEM_TYPE:		local
  CL_DEVICE_LOCAL_MEM_SIZE:		32 KByte
  CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE:	64 KByte
  CL_DEVICE_QUEUE_PROPERTIES:		CL_QUEUE_PROFILING_ENABLE
  CL_DEVICE_IMAGE_SUPPORT:		1
  CL_DEVICE_MAX_READ_IMAGE_ARGS:	128
  CL_DEVICE_MAX_WRITE_IMAGE_ARGS:	8

  CL_DEVICE_IMAGE <dim>			2D_MAX_WIDTH	 16384
					2D_MAX_HEIGHT	 16384
					3D_MAX_WIDTH	 2048
					3D_MAX_HEIGHT	 2048
					3D_MAX_DEPTH	 2048
  CL_DEVICE_PREFERRED_VECTOR_WIDTH_<t>	CHAR 1, SHORT 1, INT 1, FLOAT 1, DOUBLE 1


clDeviceQuery, Platform Name = Apple, Platform Version = OpenCL 1.2 (Dec 21 2020 17:26:51), NumDevs = 1, Device = Apple M1

Code

https://gist.githubusercontent.com/tzutalin/51a821f15a735024f16b/raw/3f7217e967d73fcd522f337d1ffa6410f5d6ec4d/clDeviceQuery.cpp

@atinfinity
Copy link
Author

Your system platform id(s) are:
	platform no. 0
		name:		 Apple
		vendor:		 Apple
		profile:	 FULL_PROFILE
		extensions:	 cl_APPLE_SetMemObjectDestructor cl_APPLE_ContextLoggingFunctions cl_APPLE_clut cl_APPLE_query_kernel_names cl_APPLE_gl_sharing cl_khr_gl_event

		with device id(s):
		device no. 0
			name:		 Apple M1
			vendor:		 Apple

			device type:		GPU
			core count:		8
			max clock frequency:	1000 MHz
			max total work size:	256
			max work dimensions:	3
			max work item sizes:	256	256	256	
			global memory size:	10922 MiBs
			global cache size:	0 KiBs
			global cacheline size:	0 bytes
			local memory size:	32 KiBs

Code

https://github.com/BeauJoh/opencl_device_query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment