cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

nou
Exemplar

Kernel fail with other than en_US locale

I have raytracer which doesn't produce correct results when locale is set to sk_SK.UTF-8 which use colon as decimal point. I attached kernel which is affected. If I set LANG=C or en_US.UTF-8 it produce correct results.

If I replace all decimal numbers with fractions like 1.0/2.0 then it work correctly. So it is most likely bug in string->float conversion.

0 Likes
15 Replies
dipak
Big Boss

Hi nou,

I'll look into it and let you know.

Regards,

0 Likes

any news on this?

0 Likes

Hi Nou,

Sorry, I was busy with other tasks and couldn't able to check this issue. Actually, when I tried to test, I haven't find any non English locales installed on our lab machines so, I asked someone to ready a setup with other locales. Then haven't got any response and also, I involved with other tasks. Thanks for reminding me. I'll try to work on it this week and let you know my findings.

Another point is, I've found a similar old threadbug in OpenCL parser depend on locale $LANG posted by you. So, can I assume both are same and the old bug (if any) is still existing?

Thanks ans Regards,

0 Likes

yes. it is same bug.

0 Likes

Hi nou,

I tried to reproduce the error with latest driver and APP SDK, but was unable to do so.

I used AMD Radeon HD 7900 series gpu card and Ubuntu 12.04.1 LTS for my testing (please find attached clinfo).

To test I used following kernel:

__kernel void coma(__global float* number) {

number[get_global_id(0)] = 1.234f;

}

To set the locale I used the following steps:

1. export LANG=sk_SK.utf8 and export LANGUAGE=sk_SK.utf8

2. Checked "locale" on command line and it showed:

$locale

LANG=sk_SK.utf8

LANGUAGE=sk_SK.utf8

LC_CTYPE="sk_SK.utf8"

LC_NUMERIC="sk_SK.utf8"

LC_TIME="sk_SK.utf8"

LC_COLLATE="sk_SK.utf8"

LC_MONETARY="sk_SK.utf8"

LC_MESSAGES="sk_SK.utf8"

LC_PAPER="sk_SK.utf8"

LC_NAME="sk_SK.utf8"

LC_ADDRESS="sk_SK.utf8"

LC_TELEPHONE="sk_SK.utf8"

LC_MEASUREMENT="sk_SK.utf8"

LC_IDENTIFICATION="sk_SK.utf8"

LC_ALL=

3. Compiled and ran the program.

Did I miss anything?

Regards,

0 Likes

yeah I tried to make simplified test case for this. It seems like only my complex kernels seems trigger this bug. That simple kernel doesn't trigger it. You should be able to reproduce simply by loading kernel to CodeXL analyze it and compare result IL/ISA code. there are few differences. Instead add there is sub or another case mul_ieee,add there is only single sub instruction.

so just run whole CodeXL under different locales, load kernel that i posted in first post and compare result IL/ISA code.

I attached my comparison. Only difference is under which locale CodeXL run. here are main differences which are IMHO responsible for it.

at line 45 and 107 in c_locale there is one more dcl_literal.

c_locale:142 add; sk_locale:136 sub

c_locale:288 mul_ieee,add; sk_locale:282 sub

0 Likes

did you managed it reproduced? or do you need additional code?

0 Likes

Hi Nou,

Sorry for this delayed reply.

I tried to reproduce the issue but was unable to do so. I performed following steps for the test.

First,  I changed system locale of Windows 7 to Slovak as described in this link Change the system locale - Windows Help. Then ran the latest CodeXL and loaded your kernel to generate the IL and ISA codes [I used these two ( Tahiti - Southern Island and Cayman- Northern Island) for comparison]. I did the same for default locale (English(US)) to generate the IL and ISA codes. When I compared the codes, I didn't get any difference.

Please find attached IL and ISA code files. Please let me know if you've other suggestions.

Regards

0 Likes

I work under Linux. You first test was under Linux too. I think this bug affect only Linux.

0 Likes

Hi Nou,

I thought the problem was related to non-US locale and could be reproducible under Windows also. I'll check it on Linux. Meanwhile please can you try the same on Windows and share your observation. If your observation matches with me, it can be assumed that the problem is only related to Linux platform.

Regards,

0 Likes

Hi Nou,

I'm able to reproduce the issue under Ubuntu 12.04.1  LTS with locale "sk_SK.UTF8.

Please find the attachment for setup details and IL/ISA files. I'll file an internal bug report and keep you updated.

BTW, did you get a chance to check the same on Windows?

Regards,

0 Likes

no I didn't have chance to check on Windows. But I am glad that you managed to reproduce it.

0 Likes

I read know issue for CodeXL and saw this one

On Linux, Analyze Mode GUI displays incorrect IL and ISA instructions if locale is not "en_US.UTF-8". (452765)

It is not CodeXL issue. It is OpenCL compiler issue because when I run that kernel it return wrong results. In other words if I don't run my aaplication under en_US locale OpenCL compiler generate garbage ISA.

0 Likes

Hi nou,

An internal bug report was already filed against this issue. AFAIK, our engg. team was able to reproduce it and they are working on it. I'll keep you updated if get any more information.

Regards,

0 Likes

I just want to be sure that you don't try fix CodeXL as it is compiler bug.

0 Likes