forked from alpaka-group/alpaka
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53392f4
commit 94e3262
Showing
18 changed files
with
243 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* Copyright 2024 Jan Stephan, Aurora Perego | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "alpaka/acc/AccGenericSycl.hpp" | ||
#include "alpaka/acc/Tag.hpp" | ||
#include "alpaka/core/Sycl.hpp" | ||
|
||
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_NVIDIA) | ||
|
||
namespace alpaka | ||
{ | ||
//! The Nvidia GPU SYCL accelerator. | ||
//! | ||
//! This accelerator allows parallel kernel execution on a oneAPI-capable Nvidia GPU target device. | ||
template<typename TDim, typename TIdx> | ||
using AccGpuSyclNvidia = AccGenericSycl<TagGpuSyclNvidia, TDim, TIdx>; | ||
|
||
namespace trait | ||
{ | ||
template<typename TDim, typename TIdx> | ||
struct AccToTag<alpaka::AccGpuSyclNvidia<TDim, TIdx>> | ||
{ | ||
using type = alpaka::TagGpuSyclNvidia; | ||
}; | ||
|
||
template<typename TDim, typename TIdx> | ||
struct TagToAcc<alpaka::TagGpuSyclNvidia, TDim, TIdx> | ||
{ | ||
using type = alpaka::AccGpuSyclNvidia<TDim, TIdx>; | ||
}; | ||
} // namespace trait | ||
|
||
} // namespace alpaka | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* Copyright 2024 Jan Stephan, Aurora Perego | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "alpaka/acc/Tag.hpp" | ||
#include "alpaka/dev/DevGenericSycl.hpp" | ||
|
||
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_NVIDIA) | ||
|
||
namespace alpaka | ||
{ | ||
using DevGpuSyclNvidia = DevGenericSycl<TagGpuSyclNvidia>; | ||
} // namespace alpaka | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* Copyright 2024 Jan Stephan, Aurora Perego | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "alpaka/acc/Tag.hpp" | ||
#include "alpaka/event/EventGenericSycl.hpp" | ||
|
||
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_NVIDIA) | ||
|
||
namespace alpaka | ||
{ | ||
using EventGpuSyclNvidia = EventGenericSycl<TagGpuSyclNvidia>; | ||
} // namespace alpaka | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* Copyright 2024 Jan Stephan, Aurora Perego | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "alpaka/acc/Tag.hpp" | ||
#include "alpaka/kernel/TaskKernelGenericSycl.hpp" | ||
|
||
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_NVIDIA) | ||
|
||
namespace alpaka | ||
{ | ||
template<typename TDim, typename TIdx, typename TKernelFnObj, typename... TArgs> | ||
using TaskKernelGpuSyclNvidia | ||
= TaskKernelGenericSycl<TagGpuSyclNvidia, AccGpuSyclNvidia<TDim, TIdx>, TDim, TIdx, TKernelFnObj, TArgs...>; | ||
|
||
} // namespace alpaka | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* Copyright 2024 Jan Stephan, Luca Ferragina, Aurora Perego | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "alpaka/dev/DevGpuSyclNvidia.hpp" | ||
#include "alpaka/mem/buf/BufGenericSycl.hpp" | ||
#include "alpaka/platform/PlatformGpuSyclNvidia.hpp" | ||
|
||
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_NVIDIA) | ||
|
||
namespace alpaka | ||
{ | ||
template<typename TElem, typename TDim, typename TIdx> | ||
using BufGpuSyclNvidia = BufGenericSycl<TElem, TDim, TIdx, PlatformGpuSyclNvidia>; | ||
} // namespace alpaka | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* Copyright 2024 Jan Stephan, Luca Ferragina, Andrea Bocci, Aurora Perego | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "alpaka/dev/DevGenericSycl.hpp" | ||
#include "alpaka/dev/Traits.hpp" | ||
#include "alpaka/platform/PlatformGenericSycl.hpp" | ||
|
||
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_NVIDIA) | ||
|
||
# include <sycl/sycl.hpp> | ||
|
||
namespace alpaka | ||
{ | ||
namespace detail | ||
{ | ||
template<> | ||
struct SYCLDeviceSelector<TagGpuSyclNvidia> | ||
{ | ||
auto operator()(sycl::device const& dev) const -> int | ||
{ | ||
auto const& vendor = dev.get_info<sycl::info::device::vendor>(); | ||
auto const is_intel_gpu = dev.is_gpu() && (vendor.find("NVIDIA") != std::string::npos); | ||
|
||
return is_intel_gpu ? 1 : -1; | ||
} | ||
}; | ||
} // namespace detail | ||
|
||
//! The SYCL device manager. | ||
using PlatformGpuSyclNvidia = PlatformGenericSycl<TagGpuSyclNvidia>; | ||
} // namespace alpaka | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* Copyright 2024 Jan Stephan, Aurora Perego | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "alpaka/acc/Tag.hpp" | ||
#include "alpaka/queue/QueueGenericSyclBlocking.hpp" | ||
|
||
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_NVIDIA) | ||
|
||
namespace alpaka | ||
{ | ||
using QueueGpuSyclNvidiaBlocking = QueueGenericSyclBlocking<TagGpuSyclNvidia>; | ||
} // namespace alpaka | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* Copyright 2024 Jan Stephan, Aurora Perego | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "alpaka/acc/Tag.hpp" | ||
#include "alpaka/queue/QueueGenericSyclNonBlocking.hpp" | ||
|
||
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_NVIDIA) | ||
|
||
namespace alpaka | ||
{ | ||
using QueueGpuSyclNvidiaNonBlocking = QueueGenericSyclNonBlocking<TagGpuSyclNvidia>; | ||
} // namespace alpaka | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.