Skip to content

Commit ac0e142

Browse files
[SYCL] Add PVC-VG support to sycl_ext_oneapi_device_architecture (#12688)
This patch adds a support of PVC-VG platfrom (PVC w/o DPAS instruction) to sycl_ext_oneapi_device_architecture extension
1 parent 5921f9c commit ac0e142

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,7 @@ StringRef SYCL::gen::resolveGenDevice(StringRef DeviceName) {
892892
.Cases("intel_gpu_acm_g11", "intel_gpu_dg2_g11", "acm_g11")
893893
.Cases("intel_gpu_acm_g12", "intel_gpu_dg2_g12", "acm_g12")
894894
.Case("intel_gpu_pvc", "pvc")
895+
.Case("intel_gpu_pvc_vg", "pvc_vg")
895896
.Case("nvidia_gpu_sm_50", "sm_50")
896897
.Case("nvidia_gpu_sm_52", "sm_52")
897898
.Case("nvidia_gpu_sm_53", "sm_53")
@@ -972,6 +973,7 @@ SmallString<64> SYCL::gen::getGenDeviceMacro(StringRef DeviceName) {
972973
.Case("acm_g11", "INTEL_GPU_ACM_G11")
973974
.Case("acm_g12", "INTEL_GPU_ACM_G12")
974975
.Case("pvc", "INTEL_GPU_PVC")
976+
.Case("pvc_vg", "INTEL_GPU_PVC_VG")
975977
.Case("sm_50", "NVIDIA_GPU_SM_50")
976978
.Case("sm_52", "NVIDIA_GPU_SM_52")
977979
.Case("sm_53", "NVIDIA_GPU_SM_53")

sycl/doc/UsersManual.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ and not recommended to use in production environment.
4848
support are accepted, providing a streamlined interface for AOT. Only one of
4949
these values at a time is supported.
5050
* intel_gpu_pvc - Ponte Vecchio Intel graphics architecture
51+
* intel_gpu_pvc_vg - Ponte Vecchio VG Intel graphics architecture
5152
* intel_gpu_acm_g12, intel_gpu_dg2_g12 - Alchemist G12 Intel graphics architecture
5253
* intel_gpu_acm_g11, intel_gpu_dg2_g11 - Alchemist G11 Intel graphics architecture
5354
* intel_gpu_acm_g10, intel_gpu_dg2_g10 - Alchemist G10 Intel graphics architecture

sycl/doc/extensions/experimental/sycl_ext_oneapi_device_architecture.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,14 @@ intel_gpu_pvc
331331
|-
332332
|Ponte Vecchio Intel graphics architecture.
333333

334+
a|
335+
[source]
336+
----
337+
intel_gpu_pvc_vg
338+
----
339+
|-
340+
|Ponte Vecchio VG Intel graphics architecture.
341+
334342
a|
335343
[source]
336344
----

sycl/include/sycl/ext/oneapi/experimental/device_architecture.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ inline namespace _V1 {
1313
namespace ext::oneapi::experimental {
1414

1515
enum class architecture {
16+
// If new element is added to this enum:
17+
//
18+
// Update
19+
// - sycl_ext_oneapi_device_architecture specification doc
20+
// - "-fsycl-targets" description in sycl/doc/UsersManual.md
21+
//
22+
// Add
23+
// - __SYCL_TARGET_<ARCH>__ to the compiler driver and to all places below
24+
// - the unique ID of the new architecture in SYCL RT source code to support
25+
// querying the device architecture
26+
//
1627
x86_64,
1728
intel_cpu_spr,
1829
intel_cpu_gnr,
@@ -43,6 +54,7 @@ enum class architecture {
4354
intel_gpu_acm_g12,
4455
intel_gpu_dg2_g12 = intel_gpu_acm_g12,
4556
intel_gpu_pvc,
57+
intel_gpu_pvc_vg,
4658
// NVIDIA architectures
4759
nvidia_gpu_sm_50,
4860
nvidia_gpu_sm_52,
@@ -185,6 +197,9 @@ static constexpr ext::oneapi::experimental::architecture max_architecture =
185197
#ifndef __SYCL_TARGET_INTEL_GPU_PVC__
186198
#define __SYCL_TARGET_INTEL_GPU_PVC__ 0
187199
#endif
200+
#ifndef __SYCL_TARGET_INTEL_GPU_PVC_VG__
201+
#define __SYCL_TARGET_INTEL_GPU_PVC_VG__ 0
202+
#endif
188203
#ifndef __SYCL_TARGET_NVIDIA_GPU_SM50__
189204
#define __SYCL_TARGET_NVIDIA_GPU_SM50__ 0
190205
#endif
@@ -370,6 +385,7 @@ static constexpr bool is_allowable_aot_mode =
370385
(__SYCL_TARGET_INTEL_GPU_ACM_G11__ == 1) ||
371386
(__SYCL_TARGET_INTEL_GPU_ACM_G12__ == 1) ||
372387
(__SYCL_TARGET_INTEL_GPU_PVC__ == 1) ||
388+
(__SYCL_TARGET_INTEL_GPU_PVC_VG__ == 1) ||
373389
(__SYCL_TARGET_NVIDIA_GPU_SM50__ == 1) ||
374390
(__SYCL_TARGET_NVIDIA_GPU_SM52__ == 1) ||
375391
(__SYCL_TARGET_NVIDIA_GPU_SM53__ == 1) ||
@@ -474,6 +490,8 @@ struct IsAOTForArchitectureClass {
474490
__SYCL_TARGET_INTEL_GPU_ACM_G12__ == 1;
475491
arr[static_cast<int>(arch::intel_gpu_pvc)] =
476492
__SYCL_TARGET_INTEL_GPU_PVC__ == 1;
493+
arr[static_cast<int>(arch::intel_gpu_pvc_vg)] =
494+
__SYCL_TARGET_INTEL_GPU_PVC_VG__ == 1;
477495
arr[static_cast<int>(arch::nvidia_gpu_sm_50)] =
478496
__SYCL_TARGET_NVIDIA_GPU_SM50__ == 1;
479497
arr[static_cast<int>(arch::nvidia_gpu_sm_52)] =

sycl/source/detail/device_info.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ constexpr std::pair<const int, oneapi_exp_arch> IntelGPUArchitectures[] = {
638638
{0x030e0005, oneapi_exp_arch::intel_gpu_acm_g11},
639639
{0x030e4000, oneapi_exp_arch::intel_gpu_acm_g12},
640640
{0x030f0007, oneapi_exp_arch::intel_gpu_pvc},
641+
{0x030f4007, oneapi_exp_arch::intel_gpu_pvc_vg},
641642
};
642643

643644
// Only for Intel CPU architectures

0 commit comments

Comments
 (0)