Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions libdevice/bfloat16_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

#if defined(__SPIR__) || defined(__SPIRV__)

#include <CL/__spirv/spirv_ops.hpp>
#include <CL/__spirv/spirv_types.hpp>
#include <cassert>
#include <cstdint>
#include <sycl/__spirv/spirv_ops.hpp>
#include <sycl/__spirv/spirv_types.hpp>

DEVICE_EXTERN_C_INLINE
uint16_t __devicelib_ConvertFToBF16INTEL(const float &x) {
Expand Down
2 changes: 1 addition & 1 deletion libdevice/nativecpu_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

#if defined(__SYCL_NATIVE_CPU__)

#include "CL/__spirv/spirv_ops.hpp"
#include "device.h"
#include <cstdint>
#include <sycl/__spirv/spirv_ops.hpp>
#include <sycl/types.hpp>

// including state definition from Native CPU UR adapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <CL/__spirv/spirv_types.hpp> // for Scope, __ocl_event_t
#include <sycl/__spirv/spirv_types.hpp> // for Scope, __ocl_event_t
#include <sycl/detail/defines_elementary.hpp> // for __DPCPP_SYCL_EXTERNAL
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT

Expand Down Expand Up @@ -1159,7 +1159,7 @@ __spirv_ocl_prefetch(const __attribute__((opencl_global)) char *Ptr,
size_t NumBytes) noexcept;

extern __DPCPP_SYCL_EXTERNAL float
__spirv_ConvertBF16ToFINTEL(uint16_t) noexcept;
__spirv_ConvertBF16ToFINTEL(uint16_t) noexcept;
extern __DPCPP_SYCL_EXTERNAL uint16_t
__spirv_ConvertFToBF16INTEL(float) noexcept;
template <int N>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#ifdef __SYCL_DEVICE_ONLY__

#include <CL/__spirv/spirv_types.hpp> // for __ocl_vec_t
#include <sycl/__spirv/spirv_types.hpp> // for __ocl_vec_t
#include <sycl/detail/defines_elementary.hpp> // for __DPCPP_SYCL_EXTERNAL

#include <cstddef> // for size_t
Expand Down Expand Up @@ -172,7 +172,7 @@ namespace __spirv {
// Helper function templates to initialize and get vector component from SPIR-V
// built-in variables
#define __SPIRV_DEFINE_INIT_AND_GET_HELPERS(POSTFIX) \
template <int ID> static size_t get##POSTFIX(); \
template <int ID> size_t get##POSTFIX(); \
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not related to the move, therefore should go in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is - if I move without this, the build fails. I'm not sure why warning isn't emitted without the move but that's not that important.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a functional change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why warning isn't emitted without the move but that's not that important.

Kind of disagree. To see different diagnostics by just renaming the file sounds important to investigate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that would be a waste of time, so if that investigation is required for making the change in this PR, I'd rather focus on other things to do.

Copy link
Contributor

Choose a reason for hiding this comment

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

I checked it myself and it seems like a bug in sycl/test/warnings/warnings.cpp checks warnings only in sycl directory and ignores warnings from the headers located in other directories. Adding --no-system-header-prefix=CL to https://github.com/intel/llvm/blob/sycl/sycl/test/warnings/warnings.cpp#L1 reproduces the problem with existing file location.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case, the warning is legit and we have to fix it here. I don't think adding the option to the test is desirable because we want to move our headers out of CL/ instead. Also, we don't have control over OpenCL headers that reside there.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a loophole in logic that defeats the purpose of the test. Headers from sycl/ include headers from CL/ and std/ directories, whereas test only checks for warnings in sycl/ directory. We can pass this test, but still have warnings in the code.

template <> size_t get##POSTFIX<0>() { return __spirv_##POSTFIX##_x(); } \
template <> size_t get##POSTFIX<1>() { return __spirv_##POSTFIX##_y(); } \
template <> size_t get##POSTFIX<2>() { return __spirv_##POSTFIX##_z(); } \
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/access/access.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <sycl/detail/defines_elementary.hpp> // for __SYCL2020_DEPRECATED

#ifdef __SYCL_DEVICE_ONLY__
#include <CL/__spirv/spirv_ops.hpp>
#include <sycl/__spirv/spirv_ops.hpp>
#include <type_traits>
#endif

Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/atomic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <CL/__spirv/spirv_types.hpp> // for Scope, MemorySemanticsMask
#include <sycl/__spirv/spirv_types.hpp> // for Scope, MemorySemanticsMask
#include <sycl/access/access.hpp> // for address_space, decorated
#include <sycl/detail/defines_elementary.hpp> // for __SYCL2020_DEPRECATED
#include <sycl/detail/helpers.hpp> // for getSPIRVMemorySemanticsMask
Expand Down
4 changes: 2 additions & 2 deletions sycl/include/sycl/detail/helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

#pragma once

#include <CL/__spirv/spirv_types.hpp> // for MemorySemanticsMask
#include <sycl/__spirv/spirv_types.hpp> // for MemorySemanticsMask
#include <sycl/access/access.hpp> // for fence_space
#include <sycl/detail/export.hpp> // for __SYCL_EXPORT
#include <sycl/memory_enums.hpp> // for memory_order

#ifdef __SYCL_DEVICE_ONLY__
#include <CL/__spirv/spirv_vars.hpp>
#include <sycl/__spirv/spirv_vars.hpp>
#endif

#include <cstddef> // for size_t
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/detail/image_ocl_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <sycl/access/access.hpp>
#include <sycl/detail/generic_type_traits.hpp>

#include <CL/__spirv/spirv_ops.hpp>
#include <sycl/__spirv/spirv_ops.hpp>

namespace sycl {
inline namespace _V1 {
Expand Down
4 changes: 2 additions & 2 deletions sycl/include/sycl/device_event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#pragma once

#include <CL/__spirv/spirv_ops.hpp>
#include <CL/__spirv/spirv_types.hpp>
#include <sycl/__spirv/spirv_ops.hpp>
#include <sycl/__spirv/spirv_types.hpp>

namespace sycl {
inline namespace _V1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#pragma once

#include <CL/__spirv/spirv_ops.hpp>
#include <sycl/__spirv/spirv_ops.hpp>
#include <sycl/bit_cast.hpp>

namespace sycl {
Expand Down
4 changes: 2 additions & 2 deletions sycl/include/sycl/ext/intel/experimental/task_sequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#pragma once

#include <CL/__spirv/spirv_ops.hpp>
#include <CL/__spirv/spirv_types.hpp>
#include <sycl/__spirv/spirv_ops.hpp>
#include <sycl/__spirv/spirv_types.hpp>
#include <sycl/aspects.hpp>
#include <sycl/exception.hpp>
#include <sycl/ext/intel/experimental/fpga_kernel_properties.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/ext/intel/pipes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <CL/__spirv/spirv_types.hpp> // for ConstantPipeStorage
#include <sycl/__spirv/spirv_types.hpp> // for ConstantPipeStorage
#include <sycl/exception.hpp> // for make_error_code, errc, exception

#include <stddef.h> // for size_t
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <CL/__spirv/spirv_ops.hpp>
#include <sycl/__spirv/spirv_ops.hpp>
#include <sycl/builtins.hpp>
#include <sycl/detail/builtins/builtins.hpp>
#include <sycl/detail/generic_type_lists.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <CL/__spirv/spirv_ops.hpp> // for __clc_BarrierInitialize
#include <sycl/__spirv/spirv_ops.hpp> // for __clc_BarrierInitialize
#include <sycl/exception.hpp>

#include <stdint.h> // for int32_t, int64_t, uint32_t, uint64_t
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <CL/__spirv/spirv_ops.hpp>
#include <sycl/__spirv/spirv_ops.hpp>
#include <sycl/ext/oneapi/properties/properties.hpp>
#include <sycl/types.hpp>

Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/ext/oneapi/matrix/matrix-intel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "matrix-unified-utils.hpp" // for use, layout, tf32, matrix
#include "utils.hpp" // for getDecorated

#include <CL/__spirv/spirv_types.hpp> // for MatrixLayout, MatrixUse
#include <sycl/__spirv/spirv_types.hpp> // for MatrixLayout, MatrixUse
#include <sycl/access/access.hpp> // for address_space, decorated
#include <sycl/builtins.hpp> // for fabs
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_ALWAYS_INLINE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

#pragma once

#include <CL/__spirv/spirv_types.hpp> // __spv namespace
#include <optional> // std::optional
#include <string_view> // std::string_view
#include <utility> // std::pair
#include <optional> // std::optional
#include <string_view> // std::string_view
#include <sycl/__spirv/spirv_types.hpp> // __spv namespace
#include <utility> // std::pair

namespace sycl {
inline namespace _V1 {
Expand Down
4 changes: 2 additions & 2 deletions sycl/include/sycl/group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#pragma once

#include <CL/__spirv/spirv_ops.hpp> // for __spirv_MemoryBarrier
#include <CL/__spirv/spirv_types.hpp> // for Scope, __ocl_event_t
#include <sycl/__spirv/spirv_ops.hpp> // for __spirv_MemoryBarrier
#include <sycl/__spirv/spirv_types.hpp> // for Scope, __ocl_event_t
#include <sycl/access/access.hpp> // for decorated, mode, addr...
#include <sycl/detail/common.hpp> // for NDLoop, __SYCL_ASSERT
#include <sycl/detail/defines.hpp> // for __SYCL_TYPE
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/kernel_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_OPERATION

#ifdef __SYCL_DEVICE_ONLY__
#include <CL/__spirv/spirv_ops.hpp>
#include <sycl/__spirv/spirv_ops.hpp>
#endif

#include <type_traits> // for remove_reference_t
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/multi_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <CL/__spirv/spirv_ops.hpp> // for __spirv_ocl_prefetch
#include <sycl/__spirv/spirv_ops.hpp> // for __spirv_ocl_prefetch
#include <sycl/access/access.hpp> // for address_space, decorated
#include <sycl/aliases.hpp> // for half
#include <sycl/detail/defines_elementary.hpp> // for __SYCL2020_DEPRECATED
Expand Down
6 changes: 3 additions & 3 deletions sycl/include/sycl/nd_item.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#pragma once

#include <CL/__spirv/spirv_ops.hpp> // for __spirv_ControlBarrier
#include <CL/__spirv/spirv_types.hpp> // for Scope
#include <CL/__spirv/spirv_vars.hpp> // for initLocalInvocationId
#include <sycl/__spirv/spirv_ops.hpp> // for __spirv_ControlBarrier
#include <sycl/__spirv/spirv_types.hpp> // for Scope
#include <sycl/__spirv/spirv_vars.hpp> // for initLocalInvocationId
#include <sycl/access/access.hpp> // for mode, fence_space
#include <sycl/detail/defines.hpp> // for __SYCL_ASSUME_INT
#include <sycl/detail/defines_elementary.hpp> // for __SYCL2020_DEPRECATED, __SY...
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/stl_wrappers/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#endif

#ifdef __SYCL_DEVICE_ONLY__
#include <CL/__spirv/spirv_vars.hpp>
#include <sycl/__spirv/spirv_vars.hpp>

// Device assertions on Windows do not work properly so we define these wrappers
// around the STL assertion headers cassert and assert.h where we redefine
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/stl_wrappers/cassert
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#endif

#ifdef __SYCL_DEVICE_ONLY__
#include <CL/__spirv/spirv_vars.hpp>
#include <sycl/__spirv/spirv_vars.hpp>

// Device assertions on Windows do not work properly so we define these wrappers
// around the STL assertion headers cassert and assert.h where we redefine
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/sycl/stl_wrappers/complex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include <type_traits>

#include <CL/__spirv/spirv_ops.hpp> // for __SYCL_CONVERGENT__
#include <sycl/__spirv/spirv_ops.hpp> // for __SYCL_CONVERGENT__
#include <sycl/half_type.hpp> // for half

// We provide std::complex specializations here for the following:
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/sampler_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <CL/__spirv/spirv_types.hpp>
#include <sycl/__spirv/spirv_types.hpp>
#include <sycl/context.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/ur.hpp>
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/spirv_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

#include <CL/__spirv/spirv_ops.hpp>
#include <detail/platform_util.hpp>
#include <sycl/__spirv/spirv_ops.hpp>
#include <sycl/detail/iostream_proxy.hpp>
#include <sycl/exception.hpp>

Expand Down
2 changes: 1 addition & 1 deletion sycl/test/check_device_code/ap_fixed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
//===----------------------------------------------------------------------===//

#include "CL/__spirv/spirv_ops.hpp"
#include "sycl/__spirv/spirv_ops.hpp"

SYCL_EXTERNAL auto test_sqrt(sycl::detail::ap_int<13> a) {
return __spirv_FixedSqrtINTEL<13, 5>(a, false, 2, 2);
Expand Down
6 changes: 3 additions & 3 deletions sycl/test/include_deps/sycl_accessor.hpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
// CHECK-NEXT: accessor.hpp
// CHECK-NEXT: access/access.hpp
// CHECK-NEXT: detail/defines_elementary.hpp
// CHECK-NEXT: CL/__spirv/spirv_ops.hpp
// CHECK-NEXT: CL/__spirv/spirv_types.hpp
// CHECK-NEXT: __spirv/spirv_ops.hpp
// CHECK-NEXT: __spirv/spirv_types.hpp
// CHECK-NEXT: detail/defines.hpp
// CHECK-NEXT: detail/export.hpp
// CHECK-NEXT: atomic.hpp
// CHECK-NEXT: detail/helpers.hpp
// CHECK-NEXT: memory_enums.hpp
// CHECK-NEXT: CL/__spirv/spirv_vars.hpp
// CHECK-NEXT: __spirv/spirv_vars.hpp
// CHECK-NEXT: multi_ptr.hpp
// CHECK-NEXT: aliases.hpp
// CHECK-NEXT: half_type.hpp
Expand Down
6 changes: 3 additions & 3 deletions sycl/test/include_deps/sycl_buffer.hpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// CHECK-NEXT: buffer.hpp
// CHECK-NEXT: access/access.hpp
// CHECK-NEXT: detail/defines_elementary.hpp
// CHECK-NEXT: CL/__spirv/spirv_ops.hpp
// CHECK-NEXT: CL/__spirv/spirv_types.hpp
// CHECK-NEXT: __spirv/spirv_ops.hpp
// CHECK-NEXT: __spirv/spirv_types.hpp
// CHECK-NEXT: detail/defines.hpp
// CHECK-NEXT: detail/export.hpp
// CHECK-NEXT: backend_types.hpp
Expand All @@ -24,7 +24,7 @@
// CHECK-NEXT: detail/common.hpp
// CHECK-NEXT: stl_wrappers/cassert
// CHECK-NEXT: stl_wrappers/assert.h
// CHECK-NEXT: CL/__spirv/spirv_vars.hpp
// CHECK-NEXT: __spirv/spirv_vars.hpp
// CHECK-NEXT: detail/helpers.hpp
// CHECK-NEXT: memory_enums.hpp
// CHECK-NEXT: detail/iostream_proxy.hpp
Expand Down
6 changes: 3 additions & 3 deletions sycl/test/include_deps/sycl_detail_core.hpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
// CHECK-NEXT: accessor.hpp
// CHECK-NEXT: access/access.hpp
// CHECK-NEXT: detail/defines_elementary.hpp
// CHECK-NEXT: CL/__spirv/spirv_ops.hpp
// CHECK-NEXT: CL/__spirv/spirv_types.hpp
// CHECK-NEXT: __spirv/spirv_ops.hpp
// CHECK-NEXT: __spirv/spirv_types.hpp
// CHECK-NEXT: detail/defines.hpp
// CHECK-NEXT: detail/export.hpp
// CHECK-NEXT: atomic.hpp
// CHECK-NEXT: detail/helpers.hpp
// CHECK-NEXT: memory_enums.hpp
// CHECK-NEXT: CL/__spirv/spirv_vars.hpp
// CHECK-NEXT: __spirv/spirv_vars.hpp
// CHECK-NEXT: multi_ptr.hpp
// CHECK-NEXT: aliases.hpp
// CHECK-NEXT: half_type.hpp
Expand Down
Loading