Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheduler redesign #101

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ add_library("${SYCLLibrary}" SHARED
"${sourceRootPath}/detail/helpers.cpp"
"${sourceRootPath}/detail/kernel_impl.cpp"
"${sourceRootPath}/detail/kernel_info.cpp"
"${sourceRootPath}/detail/memory_manager.cpp"
"${sourceRootPath}/detail/platform_host.cpp"
"${sourceRootPath}/detail/platform_opencl.cpp"
"${sourceRootPath}/detail/platform_info.cpp"
Expand All @@ -137,8 +138,12 @@ add_library("${SYCLLibrary}" SHARED
"${sourceRootPath}/detail/os_util.cpp"
"${sourceRootPath}/detail/sampler_impl.cpp"
"${sourceRootPath}/detail/scheduler/commands.cpp"
"${sourceRootPath}/detail/scheduler/commands2.cpp"
"${sourceRootPath}/detail/scheduler/printers.cpp"
"${sourceRootPath}/detail/scheduler/scheduler.cpp"
"${sourceRootPath}/detail/scheduler/graph_processor.cpp"
"${sourceRootPath}/detail/scheduler/graph_builder.cpp"
"${sourceRootPath}/detail/scheduler/scheduler2.cpp"
"${sourceRootPath}/detail/util.cpp"
"${sourceRootPath}/context.cpp"
"${sourceRootPath}/device.cpp"
Expand Down
8 changes: 7 additions & 1 deletion sycl/include/CL/sycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@

#pragma once

#ifndef SCHEDULER_10
#define SCHEDULER_20
#endif

#include <CL/sycl/accessor.hpp>
#include <CL/sycl/atomic.hpp>
#include <CL/sycl/builtins.hpp>
#include <CL/sycl/buffer.hpp>
#include <CL/sycl/builtins.hpp>
#include <CL/sycl/context.hpp>
#include <CL/sycl/device.hpp>
#include <CL/sycl/device_selector.hpp>
Expand All @@ -37,6 +41,7 @@
#include <CL/sycl/types.hpp>
#include <CL/sycl/version.hpp>

#ifndef SCHEDULER_20
// Do not include RT only function implementations for device code as it leads
// to problem. Should be finally fixed when we introduce library.
#ifndef __SYCL_DEVICE_ONLY__
Expand All @@ -46,3 +51,4 @@
#include <CL/sycl/detail/scheduler/printers.cpp>
#include <CL/sycl/detail/scheduler/scheduler.cpp>
#endif //__SYCL_DEVICE_ONLY__
#endif // !SCHEDULER_20
15 changes: 15 additions & 0 deletions sycl/include/CL/sycl/access/access.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ struct DeviceValueType<dataT, access::target::host_buffer> {
using type = dataT;
};

template <access::target accessTarget> struct TargetToAS {
constexpr static access::address_space AS =
access::address_space::global_space;
};

template <> struct TargetToAS<access::target::local> {
constexpr static access::address_space AS =
access::address_space::local_space;
};

template <> struct TargetToAS<access::target::constant_buffer> {
constexpr static access::address_space AS =
access::address_space::constant_space;
};

template <typename ElementType, access::address_space addressSpace>
struct PtrValueType;

Expand Down
7 changes: 7 additions & 0 deletions sycl/include/CL/sycl/accessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
//
//===----------------------------------------------------------------------===//

#ifdef SCHEDULER_20

#include <CL/sycl/accessor2.hpp>

#else

#pragma once

#include <type_traits>
Expand Down Expand Up @@ -1028,3 +1034,4 @@ struct hash<cl::sycl::accessor<T, Dimensions, AccessMode, AccessTarget,
}
};
} // namespace std
#endif // SCHEDULER_20
Loading