google / google/xls

Huge RAM consumption in DSLX interpreter

Open
#1,897 5 comments 0 reactions 0 assignees View on GitHub
bug dslx
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

**Describe the bug**

Running a DSLX interpreter can consume a huge amount of RAM for larger designs like [ZSTD decoder](https://github.com/google/xls/pull/1857).
Additionally, we noticed that the resources are not released between different test cases, and RAM consumption increases steadily over time.

**To Reproduce**

Steps to reproduce the behavior:
1. Checkout to the [zstd_compressed_block_dec](https://github.com/antmicro/xls/tree/zstd_compressed_block_dec) branch
2. Run any program for monitoring RAM usage (`top`, `htop`)
3. Run `bazel run -- //xls/modules/zstd:zstd_dec_dslx_test --logtostderr`
4. Observe growing RAM consumption

**Expected behavior**

The interpreter should not consume that much RAM on larger designs.
Ideally, for a correct design that reads data from all its channel queues, it should be possible to run the DSLX interpreter simulation infinitely with a (more or less) constant RAM consumption.

I will try to provide more debug/profiling information and append to this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.