From 1aa9cd3bb5132c7f6954be37dc2ea0e8a8aca1ed Mon Sep 17 00:00:00 2001 From: Mark O'Connor Date: Fri, 24 May 2024 16:24:08 +0000 Subject: [PATCH] #8792: Add support for missing devices and soft-fail --- conftest.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/conftest.py b/conftest.py index d3ab9a6df37..93cb05b6084 100644 --- a/conftest.py +++ b/conftest.py @@ -432,19 +432,31 @@ def reset_default_device(): def use_program_cache(request): import tt_lib as ttl - if "device" in request.fixturenames: + if "device" in request.fixturenames or "device_l1_small_size" in request.fixturenames: dev = ttl.device.GetDefaultDevice() dev.enable_program_cache() elif "all_devices" in request.fixturenames: devices = request.getfixturevalue("all_devices") for dev in devices: dev.enable_program_cache() + elif "pcie_devices" in request.fixturenames: + devices = request.getfixturevalue("pcie_devices") + for dev in devices: + dev.enable_program_cache() + elif "device_mesh" in request.fixturenames: + mesh = request.getfixturevalue("device_mesh") + for device_id in mesh.get_device_ids(): + mesh.get_device(device_id).enable_program_cache() elif "t3k_device_mesh" in request.fixturenames: - device_mesh = request.getfixturevalue("t3k_device_mesh") - for device_id in device_mesh.get_device_ids(): - device_mesh.get_device(device_id).enable_program_cache() + mesh = request.getfixturevalue("t3k_device_mesh") + for device_id in mesh.get_device_ids(): + mesh.get_device(device_id).enable_program_cache() + elif "pcie_device_mesh" in request.fixturenames: + mesh = request.getfixturevalue("pcie_device_mesh") + for device_id in mesh.get_device_ids(): + mesh.get_device(device_id).enable_program_cache() else: - raise ValueError("No device fixture found to apply program cache to") + logger.warning("No device fixture found to apply program cache to: PROGRAM CACHE DISABLED") yield