-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels