Closed GoogleCodeExporter closed 9 years ago
I am sorry I am unable to reproduce this. I get a valid value (233ms)
Do you get the same 0 when you execute in JTP mode?
What OS is this? Is this using the binary distribution or are you building
from the trunk?
Gary
Original comment by frost.g...@gmail.com
on 3 Jun 2012 at 6:10
I'm not sure what JTP mode is - I'm definitely running this on the GPU. I am
using Windows 7, and the binary distribution of Aparapi. The black-scholes
samples is compiled and executed under IDEA Ultimate.
Original comment by dmitrinesteruk
on 5 Jun 2012 at 7:07
This is odd.
JTP (Java Thread Pool execution) is the fallback mode in case Aparapi fails to
convert bytecode to OpenCL. Sounds like your quite sure that you are executing
on the GPU.
You can force JTP mode by setting the Java property
-Dcom.amd.aparapi.executionMode=JTP
From the command line. This forces all Kernels to be executed in a thread pool
(as if OpenCL were not available).
Alternatively from the code you can call
kernel.setExecutionMode(Kernel.EXECUTION_MODE.JTP);
Prior to calling
kernel.execute(....);
The execution time is captured by using System.currentTimeMillis() inside the
Kernel/KernelRunner. We capture one value at the start, and another at the end
and just subtract the two. I can't understand how this can be 0. Unless you
have some uber-super-fast machine...
There is another option.
We added a Profiling option recently. Maybe you can try it.
Turn on profiling from the commandline with
-Dcom.amd.aparapi.enableProfiling=true
Then in your code (after kernel.execute() has completed)
List<ProfileInfo> profileInfoList = kernel.getProfileInfo();
for (ProfileInfo profileInfo : profileInfoList) {
System.out.println(profileInfo);
}
This will report how long it took to txfer buffers and execute the kernel on
the GPU.
Gary
Original comment by frost.g...@gmail.com
on 7 Jun 2012 at 10:51
Unable to reproduce.
Please try the latest Trunk code and let us know if you are still experiencing
this issue. Thanks!
Original comment by ryan.lam...@gmail.com
on 22 Apr 2013 at 5:06
Original issue reported on code.google.com by
dmitrinesteruk
on 30 May 2012 at 10:28