Single kernel argument getting access to multiple DDR banks.

0

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,
CL_MEM_USE_HOST_PTR | CL_MEM_READ_ONLY,
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?

bdevlin
posta 4 anni fa220 visualizzazioni
2 Risposte
0

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.

con risposta 4 anni fa
0

Ok makes sense, thanks.

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

bdevlin
con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande