diff --git a/docs/libcudacxx/ptx/instructions.rst b/docs/libcudacxx/ptx/instructions.rst index ebf6e31f716..797e26d9911 100644 --- a/docs/libcudacxx/ptx/instructions.rst +++ b/docs/libcudacxx/ptx/instructions.rst @@ -22,6 +22,9 @@ PTX Instructions instructions/mbarrier_expect_tx instructions/mbarrier_test_wait instructions/mbarrier_try_wait + instructions/multimem_ld_reduce + instructions/multimem_red + instructions/multimem_st instructions/red_async instructions/st_async instructions/st_bulk diff --git a/docs/libcudacxx/ptx/instructions/multimem_ld_reduce.rst b/docs/libcudacxx/ptx/instructions/multimem_ld_reduce.rst new file mode 100644 index 00000000000..e9f5212131b --- /dev/null +++ b/docs/libcudacxx/ptx/instructions/multimem_ld_reduce.rst @@ -0,0 +1,9 @@ +.. _libcudacxx-ptx-instructions-multimem-ld_reduce: + +multimem.ld_reduce +================== + +- PTX ISA: + `multimem.ld_reduce `__ + +.. include:: generated/multimem_ld_reduce.rst diff --git a/docs/libcudacxx/ptx/instructions/multimem_red.rst b/docs/libcudacxx/ptx/instructions/multimem_red.rst new file mode 100644 index 00000000000..0a6511b78d1 --- /dev/null +++ b/docs/libcudacxx/ptx/instructions/multimem_red.rst @@ -0,0 +1,9 @@ +.. _libcudacxx-ptx-instructions-multimem-red: + +multimem.red +============ + +- PTX ISA: + `multimem.red `__ + +.. include:: generated/multimem_red.rst diff --git a/docs/libcudacxx/ptx/instructions/multimem_st.rst b/docs/libcudacxx/ptx/instructions/multimem_st.rst new file mode 100644 index 00000000000..75197f440c6 --- /dev/null +++ b/docs/libcudacxx/ptx/instructions/multimem_st.rst @@ -0,0 +1,9 @@ +.. _libcudacxx-ptx-instructions-multimem-st: + +multimem.st +=========== + +- PTX ISA: + `multimem.st `__ + +.. include:: generated/multimem_st.rst diff --git a/libcudacxx/include/cuda/__ptx/instructions/multimem_ld_reduce.h b/libcudacxx/include/cuda/__ptx/instructions/multimem_ld_reduce.h new file mode 100644 index 00000000000..29081e6107e --- /dev/null +++ b/libcudacxx/include/cuda/__ptx/instructions/multimem_ld_reduce.h @@ -0,0 +1,37 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _CUDA_PTX_MULTIMEM_LD_REDUCE_H_ +#define _CUDA_PTX_MULTIMEM_LD_REDUCE_H_ + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include + +#include // __CUDA_MINIMUM_ARCH__ and friends + +_LIBCUDACXX_BEGIN_NAMESPACE_CUDA_PTX + +#include + +_LIBCUDACXX_END_NAMESPACE_CUDA_PTX + +#endif // _CUDA_PTX_MULTIMEM_LD_REDUCE_H_ diff --git a/libcudacxx/include/cuda/__ptx/instructions/multimem_red.h b/libcudacxx/include/cuda/__ptx/instructions/multimem_red.h new file mode 100644 index 00000000000..f0fc4e4d0e5 --- /dev/null +++ b/libcudacxx/include/cuda/__ptx/instructions/multimem_red.h @@ -0,0 +1,37 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _CUDA_PTX_MULTIMEM_RED_H_ +#define _CUDA_PTX_MULTIMEM_RED_H_ + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include + +#include // __CUDA_MINIMUM_ARCH__ and friends + +_LIBCUDACXX_BEGIN_NAMESPACE_CUDA_PTX + +#include + +_LIBCUDACXX_END_NAMESPACE_CUDA_PTX + +#endif // _CUDA_PTX_MULTIMEM_RED_H_ diff --git a/libcudacxx/include/cuda/__ptx/instructions/multimem_st.h b/libcudacxx/include/cuda/__ptx/instructions/multimem_st.h new file mode 100644 index 00000000000..608402f0131 --- /dev/null +++ b/libcudacxx/include/cuda/__ptx/instructions/multimem_st.h @@ -0,0 +1,37 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _CUDA_PTX_MULTIMEM_ST_H_ +#define _CUDA_PTX_MULTIMEM_ST_H_ + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include + +#include // __CUDA_MINIMUM_ARCH__ and friends + +_LIBCUDACXX_BEGIN_NAMESPACE_CUDA_PTX + +#include + +_LIBCUDACXX_END_NAMESPACE_CUDA_PTX + +#endif // _CUDA_PTX_MULTIMEM_ST_H_ diff --git a/libcudacxx/include/cuda/ptx b/libcudacxx/include/cuda/ptx index db9e70ab7e6..d11659ac6fb 100644 --- a/libcudacxx/include/cuda/ptx +++ b/libcudacxx/include/cuda/ptx @@ -84,6 +84,9 @@ #include #include #include +#include +#include +#include #include #include #include diff --git a/libcudacxx/test/libcudacxx/cuda/ptx/ptx.multimem.ld_reduce.compile.pass.cpp b/libcudacxx/test/libcudacxx/cuda/ptx/ptx.multimem.ld_reduce.compile.pass.cpp new file mode 100644 index 00000000000..cbe0ba81971 --- /dev/null +++ b/libcudacxx/test/libcudacxx/cuda/ptx/ptx.multimem.ld_reduce.compile.pass.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: libcpp-has-no-threads + +// + +#include +#include + +#include "generated/multimem_ld_reduce.h" + +int main(int, char**) +{ + return 0; +} diff --git a/libcudacxx/test/libcudacxx/cuda/ptx/ptx.multimem.red.compile.pass.cpp b/libcudacxx/test/libcudacxx/cuda/ptx/ptx.multimem.red.compile.pass.cpp new file mode 100644 index 00000000000..b4aefa3b338 --- /dev/null +++ b/libcudacxx/test/libcudacxx/cuda/ptx/ptx.multimem.red.compile.pass.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: libcpp-has-no-threads + +// + +#include +#include + +#include "generated/multimem_red.h" + +int main(int, char**) +{ + return 0; +} diff --git a/libcudacxx/test/libcudacxx/cuda/ptx/ptx.multimem.st.compile.pass.cpp b/libcudacxx/test/libcudacxx/cuda/ptx/ptx.multimem.st.compile.pass.cpp new file mode 100644 index 00000000000..4998c854382 --- /dev/null +++ b/libcudacxx/test/libcudacxx/cuda/ptx/ptx.multimem.st.compile.pass.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +// UNSUPPORTED: libcpp-has-no-threads + +// + +#include +#include + +#include "generated/multimem_st.h" + +int main(int, char**) +{ + return 0; +}