Skip to content

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

Description

@lf2050

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions