Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOC 1.0.14 gives wrong answer on OpenCL builtin log function with -noshared options #19

Open
PXAHyLee opened this issue Jun 26, 2016 · 0 comments

Comments

@PXAHyLee
Copy link

Hi developers,

The OpenCL log function gives wrong answer when the kernel code is compiled with -noshared option. The example seems to work when I use CLOC version 1.0.10.

How to reproduce: Use different CLOC compiler version with or without -noshared flag

Expected output:
[Use CLOC 1.0.10. compiler option: cloc.sh vector_copy_codeobject.cl]

Using <Carrizo>
found device region, flags=3
in[i]: 1.0000000. log(in[i]): 0.0000000. out[i]: 0.0000000
in[i]: 2.0000000. log(in[i]): 0.6931472. out[i]: 0.6931472
in[i]: 3.0000000. log(in[i]): 1.0986123. out[i]: 1.0986123
in[i]: 4.0000000. log(in[i]): 1.3862944. out[i]: 1.3862944

[Use the latest CLOC 1.0.14, cloc.sh -noshared vector_copy_codeobject.cl]

Using <Carrizo>
found device region, flags=3
in[i]: 1.0000000. log(in[i]): 0.0000000. out[i]: 0.0000000
in[i]: 2.0000000. log(in[i]): 0.6931472. out[i]: 209364525475383353885435186370676680282084727406086750235054469216932631113440149497314782176084161203325974117941428988908447850068013206201794964536655755620876334588525370905934888334849975310646049531267822034603424551295632519500267324121017618049079602415671709738904192853945592320974745763840.0000000
in[i]: 3.0000000. log(in[i]): 1.0986123. out[i]: 0.6931472
in[i]: 4.0000000. log(in[i]): 1.3862944. out[i]: 209364525475383353885435186370676680282084727406086750235054469216932631113440149497314782176084161203325974117941428988908447850068013206201794964536655755620876334588525370905934888334849975310646049531267822034603424551295632519500267324121017618049079602415671709738904192853945592320974745763840.0000000

A log-testcase.tar.gz which I modified from vector_copy_codeobject_rocm is attached.

I haven't tested other builtin math function like sqrt used in my own kernel. I'll update the issue if I find there is a bug in other builtin math function.

Thanks,
Li

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant