tenstorrent / tt-mlir

Tenstorrent MLIR compiler
https://tenstorrent.github.io/tt-mlir/
Apache License 2.0
52 stars 7 forks source link

Get memory alignment from device #300

Open nsmithtt opened 1 month ago

nsmithtt commented 1 month ago

Currently we are using defines L1_ALIGNMENT, PCIE_ALIGNMENT, and DRAM_ALIGNMENT:

  std::vector<::flatbuffers::Offset<tt::target::ChipDesc>> chipDescs = {
      ::tt::target::CreateChipDesc(
          fbb, toFlatbuffer(device.arch()), &deviceGrid, (1 << 20), 12,
          (1 << 20), L1_ALIGNMENT, PCIE_ALIGNMENT, DRAM_ALIGNMENT),
  };

But these actually need to come from the metal device i.e. device->get_l1_alignment(), so that we don't have hard coded architecture specific numbers in our runtime. If these APIs don't exist in metal, let's file an issue and get signoff from the metal team, should be relatively uncontroversial. Please tag any filed issues against metal on this issue.

kmabeeTT commented 3 weeks ago

Added this request to metal ticket linked, nothing to do here for now, will replace with API call once ready.