Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for PCIE Slot ID in TT-SMI #68

Open
hmohiuddinTT opened this issue Feb 19, 2025 · 2 comments
Open

Request for PCIE Slot ID in TT-SMI #68

hmohiuddinTT opened this issue Feb 19, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@hmohiuddinTT
Copy link

Cards locations are identified by which PCIe slot they are installed in on a motherboard. Currently there's no way to identify which slot a card is installed in on tt-smi. We work around this by mapping device_id (/dev/tenstorrent/*) -> PCIe bus id -> slot ID via the following command:

sudo dmidecode -t slot

It would be helpful to both cloud and customers if we can get this integrated into SMI.

@hmohiuddinTT hmohiuddinTT added the enhancement New feature or request label Feb 19, 2025
@hmohiuddinTT
Copy link
Author

As an example the following ansible playbook prints the mapping:

---
- name: Check slot ids for boards installed on host
  hosts: compute
  gather_facts: false
  become: true
  tasks:
    - name: Get all board PCIe bus IDs
      ansible.builtin.shell: "lspci -d 1e52: | awk '{print $1}'"
      register: lspci_output
      changed_when: false

    - name: Get slot ID for each bus ID
      ansible.builtin.shell: dmidecode -t slot | grep -B8 {{ item }} | grep "Designation:" | awk -F ':' -F ' ' '{print $2}' | xargs
      register: slot_mappings
      loop: "{{ lspci_output.stdout_lines }}"
      when: lspci_output.stdout_lines | length > 0
      changed_when: false

    - name: Print slot IDs
      ansible.builtin.debug:
        msg: "{{ slot_mappings.results | map(attribute='stdout') | zip(lspci_output.stdout_lines) | map('join', ' | ') | join('\n') }}"
      when: lspci_output.stdout_lines | length > 0

@hmohiuddinTT
Copy link
Author

Please also add this info to the --list output along with bus id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant