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

"nopinned" option in OpenCL mode may be unset, default true all the time caused too high bandwidth #83

Open
lf2050 opened this issue Sep 4, 2023 · 0 comments

Comments

@lf2050
Copy link

lf2050 commented Sep 4, 2023

src/opencl/level0/BusSpeedDownload.cpp :
bool pinned = !op.getOptionBool("nopinned");

I use OpenCL test mode.:

./configue --with-opencl --without-cuda --prefix=$xxx
make install
./bin/shocdriver -opencl -benchmark BusSpeedDownload

The bandwidth result is too high.
I review the code, find out that:
"nopinned" option is defaultly true, so CL_MEM_ALLOC_HOST_PTR is used while creat cl buffer.

That will cause an issue: the final time result is not the time that data transfer from host to device, but transfer time from one device memory to another device memory.
that is not pcie bandwidth, but graphic ddr bandwidth.

In OpenCL spec 2.0, use CL_MEM_ALLOC_HOST_PTR will return an buffer, already on device, mapped to host.

In this case, If we want pcie bandwidth, "nopinned" must be set, "bool pinned = false;"will work

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