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

C++ SYCL_FPGA GZIP example can't handle bigger input files #2084

Open
umairsiddiqui-digitek opened this issue Dec 6, 2023 · 1 comment
Open

Comments

@umairsiddiqui-digitek
Copy link

I compiled the C++ SYCL_FPGA GZIP example with default settings (2 Engines). seems like it GZIP example can't able to handle files bigger than 600MB. When i give bigger file application crashes

$ stat -c %s tmp_blob
536871802
$ ./gzip.fpga tmp_blob -o=tmp_blob.gz
Running on device: ofs_n6001 :  Intel Acceleration Development Platform N6001  (ofs_ed00000) 
Launching High-Bandwidth DMA GZIP application with 2 engines
outputSize: 536872058 Prepin: 0
kMinBufferSize: 16384 isz: 536871802 kInOutPadding: 256
outputSize: 536872058 Prepin: 0
kMinBufferSize: 16384 isz: 536871802 kInOutPadding: 256
outputSize: 536872058 Prepin: 0
kMinBufferSize: 16384 isz: 536871802 kInOutPadding: 256
outputSize: 536872058 Prepin: 0
kMinBufferSize: 16384 isz: 536871802 kInOutPadding: 256
outputSize: 536872058 Prepin: 0
kMinBufferSize: 16384 isz: 536871802 kInOutPadding: 256
outputSize: 536872058 Prepin: 0
kMinBufferSize: 16384 isz: 536871802 kInOutPadding: 256
outputSize: 536872058 Prepin: 0
kMinBufferSize: 16384 isz: 536871802 kInOutPadding: 256
outputSize: 536872058 Prepin: 0
kMinBufferSize: 16384 isz: 536871802 kInOutPadding: 256
Throughput: 6.69636 GB/s

TP breakdown for engine #0 (GB/s)
CRC = 5.69911
LZ77 = 3.35873
Huffman Encoding = 3.35535
DMA host-to-device = 8.31162
DMA device-to-host = 6.37311

TP breakdown for engine #1 (GB/s)
CRC = 5.91431
LZ77 = 3.36041
Huffman Encoding = 3.35313
DMA host-to-device = 9.14207
DMA device-to-host = 8.82735

Compression Ratio 22.7548%
PASSED

but when i provide bigger file

$ stat -c %s linux-socfpga.tar
4339732480

$ ./gzip.fpga ./linux-socfpga.tar -o=linux-socfpga.tar.gz
Running on device: ofs_n6001 : Intel Acceleration Development Platform N6001 (ofs_ed00000)
Launching High-Bandwidth DMA GZIP application with 2 engines
outputSize: 44765440 Prepin: 0
kMinBufferSize: 16384 isz: 4339732480 kInOutPadding: 256
outputSize: 44765440 Prepin: 0
kMinBufferSize: 16384 isz: 4339732480 kInOutPadding: 256
Caught a SYCL host exception:
Native API failed. Native API returns: -4 (PI_ERROR_MEM_OBJECT_ALLOCATION_FAILURE) -4 (PI_ERROR_MEM_OBJECT_ALLOCATION_FAILURE)
terminate called after throwing an instance of 'sycl::_V1::runtime_error'
  what():  Native API failed. Native API returns: -4 (PI_ERROR_MEM_OBJECT_ALLOCATION_FAILURE) -4 (PI_ERROR_MEM_OBJECT_ALLOCATION_FAILURE)
Aborted (core dumped)

my host memory =>

$ free
              total        used        free      shared  buff/cache   available
Mem:       65583976     4882756    25815904       73340    34885316    59898552
Swap:       8138748      144640     7994108
$ grep -i hugepages /proc/meminfo
AnonHugePages:   1089536 kB
ShmemHugePages:    22528 kB
FileHugePages:   1548288 kB
HugePages_Total:    1024
HugePages_Free:     1024
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
@KevinUTAT
Copy link
Contributor

KevinUTAT commented May 2, 2024

Hello, this design uses a large amount of DDR. And the crash is due to it's running out of DDR. This is a know limitation for this design for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants