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
질문됨 4년 전220회 조회
2개 답변
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.

답변함 4년 전
0

Ok makes sense, thanks.

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

bdevlin
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠