Skip to content

v3.0.0 quick-start examples crashes with TypeError on array-valued cycle maxima #160

@tradlad

Description

@tradlad

Reproduced on:

  • repo: https://github.com/scalesim-project/SCALE-Sim
  • commit: 9f98c4371055a54c75209c2e02b640b897550532

Commands:

git clone https://github.com/scalesim-project/SCALE-Sim
cd SCALE-Sim
python3 -m venv venv
source venv/bin/activate
pip install -U pip
pip install -e .
python3 -m scalesim.scale
python3 -m scalesim.scale -c ./configs/scale.cfg -t ./topologies/GEMM_mnk/test_mnk_input.csv -i gemm -p ./results_gemm
python3 scalesim/scale.py -c configs/sparsity.cfg -t topologies/sparsity/conv.csv -p ./results_sparse

Observed failures:

  • scalesim/memory/double_buffered_scratchpad_mem.py:307
    • self.total_cycles = int(max(ofmap_serviced_cycles))
  • scalesim/memory/read_buffer.py:423
    • self.last_prefetch_cycle = int(max(response_cycles_arr))

Possible fix: reduce the NumPy-normalized arrays directly instead of calling Python max(...) on array-like entries.

Examples:

# scalesim/memory/double_buffered_scratchpad_mem.py
self.total_cycles = int(np.max(ofmap_services_cycles_np))
# scalesim/memory/read_buffer.py
self.last_prefetch_cycle = int(np.max(response_cycles_arr))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions