Quantcast

Scalar operand type has greater rank than the type of the vector element

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Scalar operand type has greater rank than the type of the vector element

Lang Hames via cfe-dev

Hi all!

 

I attached test file. In the test we have diagnostic message with the following text: “scalar operand type has greater rank than the type of the vector element. ('float2' (vector of 2 'float' values) and 'double')”.

If we run this test on the ToT then we get another diagnostic with the following message: “cannot convert between vector values of different size ('float2' (vector of 2 'float' values) and 'double')”.

 

I think that the diagnostic on the ToT is wrong because in the code we don’t have two vectors, we have one vector and one scalar. In the OpenCL V2.0 6.2.6.p2 is written that “An error shall occur if any scalar operand has greater rank than the type of the vector element.”.

I have a patch where this diagnostic was implemented.

Should I commit this patch to ToT or it doesn’t matter which diagnostic we will get in this case?

 

Best regards,

Egor

 


--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

arithmetic-conversions.cl (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Scalar operand type has greater rank than the type of the vector element

Lang Hames via cfe-dev
It looks like the scalar type and the vector element type are checked in tryVectorConvertAndSplat, but the function only tells whether the conversion succeeded or failed, not the reason it failed. I think the diagnostic clang currently shows is misleading.

On Apr 25, 2017, at 6:51 AM, Churaev, Egor via cfe-dev <[hidden email]> wrote:

Hi all!
 
I attached test file. In the test we have diagnostic message with the following text: “scalar operand type has greater rank than the type of the vector element. ('float2' (vector of 2 'float' values) and 'double')”.
If we run this test on the ToT then we get another diagnostic with the following message: “cannot convert between vector values of different size ('float2' (vector of 2 'float' values) and 'double')”.
 
I think that the diagnostic on the ToT is wrong because in the code we don’t have two vectors, we have one vector and one scalar. In the OpenCL V2.0 6.2.6.p2 is written that “An error shall occur if any scalar operand has greater rank than the type of the vector element.”.
I have a patch where this diagnostic was implemented.
Should I commit this patch to ToT or it doesn’t matter which diagnostic we will get in this case?
 
Best regards,
Egor
 


--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

<arithmetic-conversions.cl>_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Scalar operand type has greater rank than the type of the vector element

Lang Hames via cfe-dev
In reply to this post by Lang Hames via cfe-dev

Hi Egor,

 

Indeed, considering that the size of float and double is fixed in the spec, the diagnostic is wrong. Feel free to propose the patch if you have any.

 

Thanks,

Anastasia

 

From: cfe-dev [mailto:[hidden email]] On Behalf Of Churaev, Egor via cfe-dev
Sent: 25 April 2017 14:51
To: [hidden email]
Subject: [cfe-dev] Scalar operand type has greater rank than the type of the vector element

 

Hi all!

 

I attached test file. In the test we have diagnostic message with the following text: “scalar operand type has greater rank than the type of the vector element. ('float2' (vector of 2 'float' values) and 'double')”.

If we run this test on the ToT then we get another diagnostic with the following message: “cannot convert between vector values of different size ('float2' (vector of 2 'float' values) and 'double')”.

 

I think that the diagnostic on the ToT is wrong because in the code we don’t have two vectors, we have one vector and one scalar. In the OpenCL V2.0 6.2.6.p2 is written that “An error shall occur if any scalar operand has greater rank than the type of the vector element.”.

I have a patch where this diagnostic was implemented.

Should I commit this patch to ToT or it doesn’t matter which diagnostic we will get in this case?

 

Best regards,

Egor

 


--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Scalar operand type has greater rank than the type of the vector element

Lang Hames via cfe-dev

Hi Anastasia,

 

Yes, I’m working on this patch and I’ll send it to review soon.

 

Best regards,

Egor

 

From: Anastasia Stulova [mailto:[hidden email]]
Sent: Friday, May 19, 2017 2:23 PM
To: Churaev, Egor <[hidden email]>
Cc: nd <[hidden email]>; '[hidden email]' ([hidden email]) <[hidden email]>
Subject: RE: Scalar operand type has greater rank than the type of the vector element

 

Hi Egor,

 

Indeed, considering that the size of float and double is fixed in the spec, the diagnostic is wrong. Feel free to propose the patch if you have any.

 

Thanks,

Anastasia

 

From: cfe-dev [[hidden email]] On Behalf Of Churaev, Egor via cfe-dev
Sent: 25 April 2017 14:51
To: [hidden email]
Subject: [cfe-dev] Scalar operand type has greater rank than the type of the vector element

 

Hi all!

 

I attached test file. In the test we have diagnostic message with the following text: “scalar operand type has greater rank than the type of the vector element. ('float2' (vector of 2 'float' values) and 'double')”.

If we run this test on the ToT then we get another diagnostic with the following message: “cannot convert between vector values of different size ('float2' (vector of 2 'float' values) and 'double')”.

 

I think that the diagnostic on the ToT is wrong because in the code we don’t have two vectors, we have one vector and one scalar. In the OpenCL V2.0 6.2.6.p2 is written that “An error shall occur if any scalar operand has greater rank than the type of the vector element.”.

I have a patch where this diagnostic was implemented.

Should I commit this patch to ToT or it doesn’t matter which diagnostic we will get in this case?

 

Best regards,

Egor

 


--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


--------------------------------------------------------------------
Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park,
17 Krylatskaya Str., Bldg 4, Moscow 121614,
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...