Skip to content

Commit f361802

Browse files
[ESIMD] Get rid of __SYCL_EXPLICIT_SIMD__ macro (#3404)
1 parent 697469f commit f361802

File tree

3 files changed

+2
-42
lines changed

3 files changed

+2
-42
lines changed

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,8 +1139,6 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
11391139
Builder.defineMacro("__SYCL_NVPTX__", "1");
11401140
}
11411141
}
1142-
if (LangOpts.SYCLExplicitSIMD)
1143-
Builder.defineMacro("__SYCL_EXPLICIT_SIMD__", "1");
11441142
if (LangOpts.SYCLUnnamedLambda)
11451143
Builder.defineMacro("__SYCL_UNNAMED_LAMBDA__", "1");
11461144

sycl/include/CL/sycl/accessor.hpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,9 @@ class image_accessor
461461
private:
462462
friend class sycl::INTEL::gpu::AccessorPrivateProxy;
463463

464-
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SYCL_EXPLICIT_SIMD__)
464+
#ifdef __SYCL_DEVICE_ONLY__
465465
const OCLImageTy getNativeImageObj() const { return MImageObj; }
466-
#endif // __SYCL_DEVICE_ONLY__ && __SYCL_EXPLICIT_SIMD__
466+
#endif // __SYCL_DEVICE_ONLY__
467467

468468
public:
469469
using value_type = DataT;
@@ -858,19 +858,8 @@ class accessor :
858858

859859
detail::AccessorImplDevice<AdjustedDim> impl;
860860

861-
#ifdef __SYCL_EXPLICIT_SIMD__
862-
// TODO all the Image1dBuffer* stuff, including the union with MData field
863-
// below is not used anymore and is left temporarily to avoid ABI breaking
864-
// changes.
865-
using OCLImage1dBufferTy =
866-
typename detail::opencl_image1d_buffer_type<AccessMode>::type;
867-
#endif // __SYCL_EXPLICIT_SIMD__
868-
869861
union {
870862
ConcreteASPtrType MData;
871-
#ifdef __SYCL_EXPLICIT_SIMD__
872-
OCLImage1dBufferTy ImageBuffer;
873-
#endif // __SYCL_EXPLICIT_SIMD__
874863
};
875864

876865
// TODO replace usages with getQualifiedPtr

sycl/include/CL/sycl/detail/image_ocl_types.hpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -192,33 +192,6 @@ inline int getSPIRVElementSize(int ImageChannelType, int ImageChannelOrder) {
192192
}
193193
}
194194

195-
#ifdef __SYCL_EXPLICIT_SIMD__
196-
// TODO all the opencl_image1d_buffer* stuff below is not used anymore and is
197-
// left temporarily to avoid ABI breaking changes - field of this type is
198-
// temporarily present in the accessor class.
199-
template <access::mode AccessMode> struct opencl_image1d_buffer_type;
200-
201-
// OpenCL types used only when compiling DPCPP ESIMD kernels
202-
#define __SYCL_IMAGE_BUFFER_TY_DEFINE(AccessMode, AMSuffix) \
203-
template <> struct opencl_image1d_buffer_type<access::mode::AccessMode> { \
204-
using type = __ocl_image1d_buffer_##AMSuffix##_t; \
205-
}
206-
207-
__SYCL_IMAGE_BUFFER_TY_DEFINE(read, ro);
208-
__SYCL_IMAGE_BUFFER_TY_DEFINE(write, wo);
209-
__SYCL_IMAGE_BUFFER_TY_DEFINE(discard_write, wo);
210-
__SYCL_IMAGE_BUFFER_TY_DEFINE(read_write, rw);
211-
212-
template <> struct opencl_image1d_buffer_type<access::mode::atomic> {
213-
// static_assert(false && "atomic access not supported for image1d
214-
// buffers");
215-
// TODO this should be disabled; currently there is instantiation of this
216-
// class happenning even if atomic access not used - using dummy type
217-
// definition for now.
218-
using type = unsigned int;
219-
};
220-
#endif // __SYCL_EXPLICIT_SIMD__
221-
222195
template <int Dimensions, access::mode AccessMode, access::target AccessTarget>
223196
struct opencl_image_type;
224197

0 commit comments

Comments
 (0)