Accelergy-Project / timeloop-accelergy-exercises

Exercises for exploring the Fibertree, Timeloop and Accelergy tools
MIT License
85 stars 29 forks source link

Metadata Access Energy for DRAM #45

Closed Po0ria closed 6 months ago

Po0ria commented 6 months ago

I have been reviewing the examples for sparse workloads, specifically focusing on weights, and I noticed that there is no metadata access energy associated with accesses to compressed data in DRAM. I am wondering if this is being intentionally ignored for the sake of simplicity. I made a component called DRAM_metadata that is defined it as described below.

compound_components:
  version: 0.3
  classes:
  - name: dram_metadata
    attributes:
      technology: must_specify
      n_rdwr_ports: 2
      datawidth: datawidth
      metadata_storage_width: must_specify
      metadata_storage_depth: must_specify
      metadata_datawidth: must_specify
      metadata_counter_width: must_specify
      metadata_block_size: 1

    subcomponents:
      - name: storage
        class: DRAM
        attributes:
          technology: technology
          width: width
          depth: data_storage_depth
          datawidth: datawidth
          n_rdwr_ports: n_rdwr_ports

      - name: metadata_counters[0..1] # one for read, one for write
        class: intadder
        attributes:
          technology: technology
          datawidth: metadata_counter_width
      - name: metadata_storage
        class: DRAM
        attributes:
          technology: technology
          width: metadata_storage_width
          depth: metadata_storage_depth
          datawidth: metadata_datawidth
    actions:
      - name: write
        subcomponents:
          - name: storage
            actions:
              - name: write
      - name: read
        subcomponents:
          - name: storage
            actions:
              - name: read
      - name: gated_write
        subcomponents:
          - name: storage
            actions:
            - name: idle
      - name: gated_read
        subcomponents:
          - name: storage
            actions:
            - name: idle
      - name: metadata_read
        subcomponents:
          - name: metadata_storage
            actions:
              - name: read
      - name: metadata_write
        subcomponents:
          - name: metadata_storage
            actions:
              - name: write
      - name: gated_metadata_read
        subcomponents:
          - name: metadata_storage
            actions:
              - name: idle
      - name: gated_metadata_write
        subcomponents:
          - name: metadata_storage
            actions:
              - name: idle
      - name: decompression_count
        subcomponents:
          - name: metadata_counters[1]
            actions:
              - name: add
      - name: compression_count
        subcomponents:
          - name: metadata_counters[0]
            actions:
              - name: add
      - name: idle
        subcomponents:
          - name: storage
            actions:
              - name: idle
          - name: storage
            actions:
              - name: idle

Would this be an accurate simulation? Thank you very much

tanner-andrulis commented 6 months ago

By default components don't have metadata read or write energy (the common case with the tool is that people are working with dense data, so we don't want to make users specify metadata if they're not using it.)

A few notes: