// Copyright 2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "sycl_device.h"

OIDN_NAMESPACE_BEGIN

  // Table of PCI device IDs for an architecture
  struct SYCLDeviceIDTable
  {
    SYCLArch arch;
    std::vector<uint16_t> ids;
  };

  // Tables of supported device architectures and PCI device IDs
  // These should match the AOT targets defined in CMakeLists.txt
  // Source: https://github.com/intel/compute-runtime
  inline const std::vector<SYCLDeviceIDTable> syclDeviceIDTables =
  {
    {
      SYCLArch::XeLP,
      {
        // tgllp
        0xFF20, 0x9A49, 0x9A40, 0x9A59, 0x9A60, 0x9A68, 0x9A70, 0x9A78,

        // rkl
        0x4C80, 0x4C8A, 0x4C8B, 0x4C8C, 0x4C90, 0x4C9A,

        // adl-s
        0x4680, 0x4682, 0x4688, 0x468A, 0x4690, 0x4692, 0x4693, 0xA780, 0xA781, 0xA782,
        0xA783, 0xA788, 0xA789, 0xA78B,

        // adl-p
        0x46A0, 0x46B0, 0x46A1, 0x46A2, 0x46A3, 0x46A6, 0x46A8, 0x46AA, 0x462A, 0x4626,
        0x4628, 0x46B1, 0x46B2, 0x46B3, 0x46C0, 0x46C1, 0x46C2, 0x46C3, 0xA7A0, 0xA720,
        0xA7A8, 0xA7A1, 0xA721, 0xA7A9, 0xA7AA, 0xA7AB, 0xA7AC, 0xA7AD,

        // adl-n
        0x46D0, 0x46D1, 0x46D2,

        // dg1
        0x4905, 0x4906, 0x4907, 0x4908,
      }
    },
    {
      SYCLArch::XeLPG,
      {
        // mtl-m
        0x7D40, 0x7D45, 0x7D60, 0x7D67,

        // mtl-p
        0x7D55, 0x7DD5,
      }
    },
    {
      SYCLArch::XeHPG,
      {
        // acm-g10
        0x4F80, 0x4F81, 0x4F82, 0x4F83, 0x4F84, 0x5690, 0x5691, 0x5692, 0x56A0, 0x56A1,
        0x56A2, 0x56C0,

        // acm-g11
        0x4F87, 0x4F88, 0x5693, 0x5694, 0x5695, 0x56A5, 0x56A6, 0x56B0, 0x56B1, 0x56C1,
        0x56BA, 0x56BB, 0x56BC, 0x56BD,

        // acm-g12
        0x5696, 0x5697, 0x56A3, 0x56A4, 0x56B2, 0x56B3, 0x4F85, 0x4F86,
      }
    },
    {
      SYCLArch::XeHPC,
      {
        // pvc-sdv (pvc-xl)
        0x0BD0,

        // pvc (pvc-xt)
        0x0BD5, 0x0BD6, 0x0BD7, 0x0BD8, 0x0BD9, 0x0BDA, 0x0BDB, 0x0B69, 0x0B6E,
      },
    },
    #if !defined(OIDN_DEVICE_SYCL_AOT)
    {
      SYCLArch::XeHPC_NoDPAS,
      {
        // pvc-xt-c0-vg
        0x0BD4,
      }
    }
    #endif
  };

OIDN_NAMESPACE_END