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

Increase maximal Mchan DMA transfer sizes from 64KiB to 128KiB #47

Open
wants to merge 6 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ jobs:
{
"name": "testFloatMul",
"L1": [2000]
},
{
"name": "largeFloatAdd",
"L1": [220000]
}
]
num-cores: 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ def _rectToDMAStruct(cls, ctxt: NetworkContext, rectangle: HyperRectangle, direc
mchan_flags += 0x4
mchan_cmd = length_2d_copy + (mchan_flags << 17)

assert length_2d_copy <= 2**17, f"The DMA transfer size for mchan should be representable with 17 bits, current value is {length_2d_copy}"

struct = PULPStructDataTypes.DMA_copy(
{
"ext": referenceBuffer.name,
Expand Down
2 changes: 1 addition & 1 deletion Deeploy/Targets/PULPOpen/DataTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DMA_copy(Struct):
"number_of_2d_copies": uint16_t,
"stride_1d": uint16_t,
"number_of_1d_copies": uint16_t,
"length_1d_copy": uint16_t,
"length_1d_copy": uint32_t,
"mchan_cmd": uint32_t,
"dir": int32_t,
"tid": int32_t
Expand Down
Binary file added DeeployTest/Tests/largeFloatAdd/inputs.npz
Binary file not shown.
Binary file added DeeployTest/Tests/largeFloatAdd/network.onnx
Binary file not shown.
Binary file added DeeployTest/Tests/largeFloatAdd/outputs.npz
Binary file not shown.
2 changes: 1 addition & 1 deletion TargetLibraries/PULPOpen/inc/dory_dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ typedef struct {
unsigned short number_of_2d_copies;
unsigned short stride_1d;
unsigned short number_of_1d_copies;
unsigned short length_1d_copy;
unsigned int length_1d_copy;
unsigned int mchan_cmd;
int dir; // 0 l1->l2, 1 l2->l1
int tid;
Expand Down
Loading