[clinfo] 03/30: Two new undocumented AMD properties

Andreas Beckmann anbe at moszumanska.debian.org
Tue Apr 28 12:53:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository clinfo.

commit 19aaa56b168f0a0cf633923e6baca3d4a21c13f1
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Tue Nov 18 21:00:44 2014 +0100

    Two new undocumented AMD properties
---
 man/clinfo.1 | 12 +++++++++++-
 src/clinfo.c | 33 ++++++++++++++++++++++++++++++---
 src/ext.h    |  1 -
 3 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/man/clinfo.1 b/man/clinfo.1
index 19a3c0b..b3cf335 100644
--- a/man/clinfo.1
+++ b/man/clinfo.1
@@ -144,8 +144,18 @@ extension function is found.
 .SH BUGS
 The results of the following undocumented properties might be
 interpreted incorrectly:
-.IP \(bu 2
+.TP 2
 .B CL_DEVICE_GLOBAL_FREE_MEMORY_AMD
+(assumed: two memory sizes expressed in MB);
+.TP
+.B CL_DEVICE_THREAD_TRACE_SUPPORTED_AMD
+(assumed: a boolean that denotes if thread tracing is supported or not);
+.TP
+.B CL_DEVICE_GFXIP_MAJOR_AMD
+.TQ
+.B CL_DEVICE_GFXIP_MINOR_AMD
+(assumed: two integer values that mark the overall hardware generation of
+the GPU, similar to the Compute Capabiity of NVIDIA devices).
 
 .P
 Please report any issues on
diff --git a/src/clinfo.c b/src/clinfo.c
index 5219e8b..4ae0be8 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -1057,6 +1057,26 @@ int device_info_cc_nv(cl_device_id dev, cl_device_info param, const char *pname,
 	return had_error;
 }
 
+/* AMD GFXIP */
+int device_info_gfxip_amd(cl_device_id dev, cl_device_info param, const char *pname,
+	const struct device_info_checks *chk)
+{
+	cl_uint major, val;
+	GET_VAL; /* MAJOR */
+	if (!had_error) {
+		major = val;
+		param = CL_DEVICE_GFXIP_MINOR_AMD;
+		current_param = "CL_DEVICE_GFXIP_MINOR_AMD";
+		GET_VAL;
+		if (!had_error)
+			snprintf(strbuf, bufsz, "%u.%u", major, val);
+	}
+
+	show_strbuf(pname, 0);
+	return had_error;
+}
+
+
 /* Device Partition, CLINFO_HUMAN header */
 int device_info_partition_header(cl_device_id dev, cl_device_info param, const char *pname,
 	const struct device_info_checks *chk)
@@ -1530,9 +1550,15 @@ struct device_info_traits dinfo_traits[] = {
 	{ CLINFO_BOTH, DINFO_SFX(CL_DEVICE_MAX_CLOCK_FREQUENCY, "Max clock frequency", "MHz", int), NULL },
 
 	/* Device Compute Capability (NV) is multipart, so different for HUMAN and RAW */
-	{ CLINFO_HUMAN, DINFO(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV, "NVIDIA Compute Capability", cc_nv), dev_has_nv },
-	{ CLINFO_RAW, DINFO(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV, "NVIDIA Compute Capability Major", int), dev_has_nv },
-	{ CLINFO_RAW, DINFO(CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV, "NVIDIA Compute Capability Minor", int), dev_has_nv },
+	{ CLINFO_HUMAN, DINFO(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV, "Compute Capability (NV)", cc_nv), dev_has_nv },
+	{ CLINFO_RAW, DINFO(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV, INDENT "Compute Capability Major (NV)", int), dev_has_nv },
+	{ CLINFO_RAW, DINFO(CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV, INDENT "Compute Capability Minor (NV)", int), dev_has_nv },
+
+	/* GFXIP (AMD) is multipart, so different for HUMAN and RAW */
+	/* TODO: find a better human-friendly name than GFXIP */
+	{ CLINFO_HUMAN, DINFO(CL_DEVICE_GFXIP_MAJOR_AMD, "GFXIP (AMD)", gfxip_amd), dev_is_gpu_amd },
+	{ CLINFO_RAW, DINFO(CL_DEVICE_GFXIP_MAJOR_AMD, INDENT "GFXIP MAJOR (AMD)", int), dev_is_gpu_amd },
+	{ CLINFO_RAW, DINFO(CL_DEVICE_GFXIP_MINOR_AMD, INDENT "GFXIP MINOR (AMD)", int), dev_is_gpu_amd },
 
 	{ CLINFO_BOTH, DINFO_SFX(CL_DEVICE_CORE_TEMPERATURE_ALTERA, "Core Temperature (Altera)", " C", int), dev_has_altera_dev_temp },
 
@@ -1672,6 +1698,7 @@ struct device_info_traits dinfo_traits[] = {
 
 	/* Kernel execution capabilities */
 	{ CLINFO_BOTH, DINFO(CL_DEVICE_EXECUTION_CAPABILITIES, "Execution capabilities", execap), NULL },
+	{ CLINFO_BOTH, DINFO(CL_DEVICE_THREAD_TRACE_SUPPORTED_AMD, INDENT "Thread trace supported (AMD)", bool), dev_is_gpu_amd },
 	{ CLINFO_BOTH, DINFO(CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV, INDENT "Kernel execution timeout (NV)", bool), dev_has_nv },
 	{ CLINFO_BOTH, DINFO(CL_DEVICE_GPU_OVERLAP_NV, "Concurrent copy and kernel execution (NV)", bool), dev_has_nv },
 	{ CLINFO_BOTH, DINFO(CL_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT_NV, INDENT "Number of async copy engines", int), dev_has_nv },
diff --git a/src/ext.h b/src/ext.h
index 57c7161..cf5e245 100644
--- a/src/ext.h
+++ b/src/ext.h
@@ -91,7 +91,6 @@ typedef cl_bitfield         cl_device_svm_capabilities;
 #define CL_DEVICE_GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD	0x4046
 #define CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD	0x4047
 #define CL_DEVICE_LOCAL_MEM_BANKS_AMD			0x4048
-/* TODO: */
 #define CL_DEVICE_THREAD_TRACE_SUPPORTED_AMD		0x4049
 #define CL_DEVICE_GFXIP_MAJOR_AMD			0x404A
 #define CL_DEVICE_GFXIP_MINOR_AMD			0x404B

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git



More information about the Pkg-opencl-commits mailing list