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
94e3262
commit 386ebeb
Showing
21 changed files
with
270 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_AMD) | ||
|
||
namespace alpaka | ||
{ | ||
//! The Amd GPU SYCL accelerator. | ||
//! | ||
//! This accelerator allows parallel kernel execution on a oneAPI-capable Amd GPU target device. | ||
template<typename TDim, typename TIdx> | ||
using AccGpuSyclAmd = AccGenericSycl<TagGpuSyclAmd, TDim, TIdx>; | ||
|
||
namespace trait | ||
{ | ||
template<typename TDim, typename TIdx> | ||
struct AccToTag<alpaka::AccGpuSyclAmd<TDim, TIdx>> | ||
{ | ||
using type = alpaka::TagGpuSyclAmd; | ||
}; | ||
|
||
template<typename TDim, typename TIdx> | ||
struct TagToAcc<alpaka::TagGpuSyclAmd, TDim, TIdx> | ||
{ | ||
using type = alpaka::AccGpuSyclAmd<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_AMD) | ||
|
||
namespace alpaka | ||
{ | ||
using DevGpuSyclAmd = DevGenericSycl<TagGpuSyclAmd>; | ||
} // 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_AMD) | ||
|
||
namespace alpaka | ||
{ | ||
using EventGpuSyclAmd = EventGenericSycl<TagGpuSyclAmd>; | ||
} // 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,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_AMD) | ||
|
||
namespace alpaka | ||
{ | ||
template<typename TDim, typename TIdx, typename TKernelFnObj, typename... TArgs> | ||
using TaskKernelGpuSyclAmd | ||
= TaskKernelGenericSycl<TagGpuSyclAmd, AccGpuSyclAmd<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/DevGpuSyclAmd.hpp" | ||
#include "alpaka/mem/buf/BufGenericSycl.hpp" | ||
#include "alpaka/platform/PlatformGpuSyclAmd.hpp" | ||
|
||
#if defined(ALPAKA_ACC_SYCL_ENABLED) && defined(ALPAKA_SYCL_ONEAPI_GPU_AMD) | ||
|
||
namespace alpaka | ||
{ | ||
template<typename TElem, typename TDim, typename TIdx> | ||
using BufGpuSyclAmd = BufGenericSycl<TElem, TDim, TIdx, PlatformGpuSyclAmd>; | ||
} // 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_AMD) | ||
|
||
# include <sycl/sycl.hpp> | ||
|
||
namespace alpaka | ||
{ | ||
namespace detail | ||
{ | ||
template<> | ||
struct SYCLDeviceSelector<TagGpuSyclAmd> | ||
{ | ||
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("Amd(R) Corporation") != std::string::npos); | ||
|
||
return is_intel_gpu ? 1 : -1; | ||
} | ||
}; | ||
} // namespace detail | ||
|
||
//! The SYCL device manager. | ||
using PlatformGpuSyclAmd = PlatformGenericSycl<TagGpuSyclAmd>; | ||
} // 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_AMD) | ||
|
||
namespace alpaka | ||
{ | ||
using QueueGpuSyclAmdBlocking = QueueGenericSyclBlocking<TagGpuSyclAmd>; | ||
} // 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_AMD) | ||
|
||
namespace alpaka | ||
{ | ||
using QueueGpuSyclAmdNonBlocking = QueueGenericSyclNonBlocking<TagGpuSyclAmd>; | ||
} // 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,13 @@ | ||
/* Copyright 2023 Jan Stephan | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#include "alpaka/standalone/GenericSycl.hpp" | ||
|
||
#ifndef ALPAKA_SYCL_ONEAPI_GPU_AMD | ||
# define ALPAKA_SYCL_ONEAPI_GPU_AMD | ||
#endif | ||
|
||
#ifndef ALPAKA_SYCL_TARGET_GPU_AMD | ||
# define ALPAKA_SYCL_TARGET_GPU_AMD | ||
#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,13 @@ | ||
/* Copyright 2023 Jan Stephan | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
#include "alpaka/standalone/GenericSycl.hpp" | ||
|
||
#ifndef ALPAKA_SYCL_ONEAPI_GPU_NVIDIA | ||
# define ALPAKA_SYCL_ONEAPI_GPU_NVIDIA | ||
#endif | ||
|
||
#ifndef ALPAKA_SYCL_TARGET_GPU_NVIDIA | ||
# define ALPAKA_SYCL_TARGET_GPU_NVIDIA | ||
#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
Oops, something went wrong.