Single kernel argument getting access to multiple DDR banks.


If I have this during linking: --sp multiexp_kernel_1.point_p:DDR\[0:1]

Does this mean my kernel will be able to access both DDR banks? For example I need to consume 32GB of input data.
It says this during linking:

INFO: \[CFGEN 83-0] Port Specs:
INFO: \[CFGEN 83-0] kernel: multiexp_kernel_1, k_port: point_p, sptag: DDR\[0:1]
INFO: \[CFGEN 83-2228] Creating mapping for argument multiexp_kernel_1.point_p to DDR\[0:1] for directive multiexp_kernel_1.point_p:DDR\[0:1]

And then the buffer I assign to \[point_p] can have a \[vector_size_bytes] that uses 32GB?

cl::Buffer buffer_r1(context,
vector_size_bytes = 2 << 34,...

Or would I need to create extra inputs and bridging logic to control access in the kernel + multiple buffers in host.cpp to get access to 32GB?

asked 4 years ago185 views
2 Answers

By specifying --sp multiexp_kernel_1.point_p:DDR[0:1], you are connecting this kernel port (or argument) to both DDRs. This means that the addressable space, as seen by the kernel, will indeed by 32GB.

However, the XRT buffers declared in your host application must fit into a single DDR bank. Each buffer can therefore be 16GB at the most.

By connecting your kernel to DDR[0:1], you are allowing XRT to chose whether the buffer will be allocated in DDR[0] or DDR[1], but it cannot be allocated across both banks.

If your kernel needs to access 32GB worth of data, then you need to create at least 2 different buffers in your host code. Your kernel should then have as many arguments as you will declare buffers in the host code. Each of these kernel arguments can then be mapped to the desired DDR bank.

answered 4 years ago

Ok makes sense, thanks.

(Seems you had the same formatting issues as me :) )

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions