[Mesa-dev,2/8] clover: Add device_clc_version to device.[hc]pp

Submitted by Aaron Watry on July 31, 2017, 1:26 a.m.

Details

Message ID 20170731012612.23176-3-awatry@gmail.com
State New
Headers show
Series "A few clover fixes for both CTS and eventual 1.2 support" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Aaron Watry July 31, 2017, 1:26 a.m.
device_version and device_clc_version are not necessarily the same for
devices that support CL 1.0, but have a 1.1 compiler and the necessary
extensions.

CC: Jan Vesey <jan.vesely@rutgers.edu>
---
 src/gallium/state_trackers/clover/api/device.cpp  | 2 +-
 src/gallium/state_trackers/clover/core/device.cpp | 5 +++++
 src/gallium/state_trackers/clover/core/device.hpp | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
index 18ed2f059f..b1b7917e4e 100644
--- a/src/gallium/state_trackers/clover/api/device.cpp
+++ b/src/gallium/state_trackers/clover/api/device.cpp
@@ -368,7 +368,7 @@  clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
       break;
 
    case CL_DEVICE_OPENCL_C_VERSION:
-      buf.as_string() = "OpenCL C " + dev.device_version() + " ";
+      buf.as_string() = "OpenCL C " + dev.device_clc_version() + " ";
       break;
 
    case CL_DEVICE_PRINTF_BUFFER_SIZE:
diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp
index 0277495506..68856ae36b 100644
--- a/src/gallium/state_trackers/clover/core/device.cpp
+++ b/src/gallium/state_trackers/clover/core/device.cpp
@@ -245,3 +245,8 @@  std::string
 device::device_version() const {
     return "1.1";
 }
+
+std::string
+device::device_clc_version() const {
+    return "1.1";
+}
diff --git a/src/gallium/state_trackers/clover/core/device.hpp b/src/gallium/state_trackers/clover/core/device.hpp
index 3cf7e20be5..efc217aedb 100644
--- a/src/gallium/state_trackers/clover/core/device.hpp
+++ b/src/gallium/state_trackers/clover/core/device.hpp
@@ -75,6 +75,7 @@  namespace clover {
       std::string device_name() const;
       std::string vendor_name() const;
       std::string device_version() const;
+      std::string device_clc_version() const;
       enum pipe_shader_ir ir_format() const;
       std::string ir_target() const;
       enum pipe_endian endianness() const;

Comments

On Sun, 2017-07-30 at 20:26 -0500, Aaron Watry wrote:
> device_version and device_clc_version are not necessarily the same for
> devices that support CL 1.0, but have a 1.1 compiler and the necessary
> extensions.
> 
> CC: Jan Vesey <jan.vesely@rutgers.edu>

I think you might consider squashing 1/8 and 2/8. squashed or not:
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>

Jan

> ---
>  src/gallium/state_trackers/clover/api/device.cpp  | 2 +-
>  src/gallium/state_trackers/clover/core/device.cpp | 5 +++++
>  src/gallium/state_trackers/clover/core/device.hpp | 1 +
>  3 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
> index 18ed2f059f..b1b7917e4e 100644
> --- a/src/gallium/state_trackers/clover/api/device.cpp
> +++ b/src/gallium/state_trackers/clover/api/device.cpp
> @@ -368,7 +368,7 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
>        break;
>  
>     case CL_DEVICE_OPENCL_C_VERSION:
> -      buf.as_string() = "OpenCL C " + dev.device_version() + " ";
> +      buf.as_string() = "OpenCL C " + dev.device_clc_version() + " ";
>        break;
>  
>     case CL_DEVICE_PRINTF_BUFFER_SIZE:
> diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp
> index 0277495506..68856ae36b 100644
> --- a/src/gallium/state_trackers/clover/core/device.cpp
> +++ b/src/gallium/state_trackers/clover/core/device.cpp
> @@ -245,3 +245,8 @@ std::string
>  device::device_version() const {
>      return "1.1";
>  }
> +
> +std::string
> +device::device_clc_version() const {
> +    return "1.1";
> +}
> diff --git a/src/gallium/state_trackers/clover/core/device.hpp b/src/gallium/state_trackers/clover/core/device.hpp
> index 3cf7e20be5..efc217aedb 100644
> --- a/src/gallium/state_trackers/clover/core/device.hpp
> +++ b/src/gallium/state_trackers/clover/core/device.hpp
> @@ -75,6 +75,7 @@ namespace clover {
>        std::string device_name() const;
>        std::string vendor_name() const;
>        std::string device_version() const;
> +      std::string device_clc_version() const;
>        enum pipe_shader_ir ir_format() const;
>        std::string ir_target() const;
>        enum pipe_endian endianness() const;
On Fri, Aug 4, 2017 at 1:14 PM, Jan Vesely <jan.vesely@rutgers.edu> wrote:
> On Sun, 2017-07-30 at 20:26 -0500, Aaron Watry wrote:
>> device_version and device_clc_version are not necessarily the same for
>> devices that support CL 1.0, but have a 1.1 compiler and the necessary
>> extensions.
>>
>> CC: Jan Vesey <jan.vesely@rutgers.edu>
>
> I think you might consider squashing 1/8 and 2/8. squashed or not:
> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>

Thanks. I'll squash and push them both.

--Aaron

>
> Jan
>
>> ---
>>  src/gallium/state_trackers/clover/api/device.cpp  | 2 +-
>>  src/gallium/state_trackers/clover/core/device.cpp | 5 +++++
>>  src/gallium/state_trackers/clover/core/device.hpp | 1 +
>>  3 files changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp
>> index 18ed2f059f..b1b7917e4e 100644
>> --- a/src/gallium/state_trackers/clover/api/device.cpp
>> +++ b/src/gallium/state_trackers/clover/api/device.cpp
>> @@ -368,7 +368,7 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
>>        break;
>>
>>     case CL_DEVICE_OPENCL_C_VERSION:
>> -      buf.as_string() = "OpenCL C " + dev.device_version() + " ";
>> +      buf.as_string() = "OpenCL C " + dev.device_clc_version() + " ";
>>        break;
>>
>>     case CL_DEVICE_PRINTF_BUFFER_SIZE:
>> diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp
>> index 0277495506..68856ae36b 100644
>> --- a/src/gallium/state_trackers/clover/core/device.cpp
>> +++ b/src/gallium/state_trackers/clover/core/device.cpp
>> @@ -245,3 +245,8 @@ std::string
>>  device::device_version() const {
>>      return "1.1";
>>  }
>> +
>> +std::string
>> +device::device_clc_version() const {
>> +    return "1.1";
>> +}
>> diff --git a/src/gallium/state_trackers/clover/core/device.hpp b/src/gallium/state_trackers/clover/core/device.hpp
>> index 3cf7e20be5..efc217aedb 100644
>> --- a/src/gallium/state_trackers/clover/core/device.hpp
>> +++ b/src/gallium/state_trackers/clover/core/device.hpp
>> @@ -75,6 +75,7 @@ namespace clover {
>>        std::string device_name() const;
>>        std::string vendor_name() const;
>>        std::string device_version() const;
>> +      std::string device_clc_version() const;
>>        enum pipe_shader_ir ir_format() const;
>>        std::string ir_target() const;
>>        enum pipe_endian endianness() const;