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

WIP: Proposal to add a new kind for OpenCL #16

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
26 changes: 24 additions & 2 deletions mem_alloc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,24 @@ \subsubsection{Restrictors}

\end{itemize}

\section{OpenCL memory kind}

We define \infokey{opencl} as a memory kind that refers to the memory
allocated by the OpenCL runtime system~\cite{oclref}.
\exref{example:alloc-kind-spm-sycl} showcases its usage.

\subsubsection{Restrictors}

\begin{itemize}

\item \infokey{host}: Support for memory that is owned by the host and is accessible by the host and by any OpenCL devices.

\item \infokey{device}: Support for memory that is owned by a specific OpenCL device.

\item \infokey{shared}: Support for memory that has shared ownership between the host and one or more OpenCL devices.

\end{itemize}

\chapter{Examples}
\label{chap:examples}

Expand Down Expand Up @@ -217,6 +235,10 @@ \section{MPI plus SYCL}
return retType{ true, "level_zero",
{"device", "shared", "host"} };
break;
case sycl::backend::ext_oneapi_opencl:
return retType{ true, "opencl",
{"device", "shared", "host"} };
break;
case sycl::backend::ext_oneapi_cuda:
return retType { true, "cuda",
{"device", "managed", "host"} };
Expand Down Expand Up @@ -368,7 +390,7 @@ \section{MPI plus SYCL}
MPI_Info_free(&info);
}
if (!provided)
MPI_Session_Finalize(&session);
MPI_Session_finalize(&session);
else {
// usage mode: ASSERTED
std::string assert_key_for_mpi(
Expand Down Expand Up @@ -477,7 +499,7 @@ \section{MPI plus SYCL}
<< std::endl;

MPI_Comm_disconnect(&comm);
MPI_Session_Finalize(&session);
MPI_Session_finalize(&session);

int answer = std::numeric_limits<int>::max();
if (method == InteractionMethod
Expand Down
Binary file modified mpi-report.pdf
Binary file not shown.