Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace ext::oneapi::experimental {

enum class architecture {
x86_64,
intel_cpu_spr,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more complicated than adding new item here for CPU device: it won't be usable if user tries to use it in device AOT or host scenarios.
(1) What we can do right now is that we can add explicit limitation to the spec and add the actual functionality later
(2) Another option is to introduce all intel_cpu_* items as separate PR and make this PR dependent on that PR (e.g., regarding host scenario we already have the updated OpenCL extension in OpenCL CPU RT which allows us to query the unique IDs of Intel CPU architectures)
@gmlueck what do you think between (1) and (2) or maybe other option?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have a plan for how this new SPR enumerator fits in with all of the other uses of the architecture enum. Currently, all of the following are related:

  • The enumerators in architecture.
  • The legal value for the -fsycl-targets command line switch.
  • The if_architecture_is function that can be called from device code.
  • The device::ext_oneapi_architecture_is function that can be called from host code.

It seems like it would be nice to support syntax like -fsycl-targets=intel_cpu_spr, which would AOT compile device code for SPR. This would provide a consistent way to AOT compile for either GPU or CPU devices. I think this would also enable support for if_architecture_is as a side-effect.

For device::ext_oneapi_architecture_is, can we use the CPUID instruction to determine if the CPU is SPR?

It might be useful to have a meeting to discuss this further.

intel_gpu_bdw,
intel_gpu_skl,
intel_gpu_kbl,
Expand Down
392 changes: 392 additions & 0 deletions sycl/include/sycl/ext/oneapi/matrix/compile-time-query.hpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sycl/include/sycl/ext/oneapi/matrix/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
#include <sycl/ext/oneapi/matrix/static-query.hpp>
#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION
#if (SYCL_EXT_ONEAPI_MATRIX_VERSION == 4)
#include <sycl/ext/oneapi/matrix/compile-time-query.hpp>
#include <sycl/ext/oneapi/matrix/matrix-unified.hpp>
#include <sycl/ext/oneapi/matrix/static-query-use.hpp>
#endif // SYCL_EXT_ONEAPI_MATRIX_VERSION
Loading