weiya711 / sam

MIT License
15 stars 4 forks source link

[Mem Modeling] Todos to get memory modeling automatic generation #72

Open weiya711 opened 1 year ago

weiya711 commented 1 year ago

Things needed for memory modeling automatic generation of tests branch name: tiling_loop_generation file name: scripts/test_generating_code.py

TODO: @Ritvik1sharma needs to split this into test_generating_code_mem.py and test_generating_code_ideal.py. Also test_generating_code_mem.py should call test_generating_code_ideal.py to generate the inner-most loop.

Needed from pre-tiling scripts

  1. Generate format arrays (seg/crd for sparse, dim for dense) for EACH level of the memory hierarchy. Must follow the same naming convention as @Ritvik1sharma's convention
  2. Change naming convention nested file structure for pre-tiled tiles. I.e. i00_k00_i0_k0 --> i00_k00/i0_k0
  3. Make sure to give crd array for tile file names that goes from ref --> crd tuple

Compiler

  1. Name of expressions/test
  2. Input tensor list and result tensor at the top of the SAM graph (where formats are given). I.e. in_tensors="B(i,k),C(k,j)" and out_tensors="X(i,j)"

For next steps/future work with different tiling index reorderings: Either need 1) a database of all "input iteration" permutations for orders 1, 2, 3, ... or 2) Need the compiler to generate the "input iteration" graph for each level that's a different index ordering

weiya711 commented 1 year ago

Naming convention is Memory level 2: "00", Memory level 1: "0", Memory level 0: ""