Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 4 additions & 2 deletions include/rmm/aligned.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@

#pragma once

#include <rmm/detail/export.hpp>

#include <cassert>
#include <cstddef>
#include <cstdint>

namespace rmm {
namespace RMM_EXPORT rmm {

/**
* @addtogroup utilities
Expand Down Expand Up @@ -123,4 +125,4 @@ static constexpr std::size_t CUDA_ALLOCATION_ALIGNMENT{256};

/** @} */ // end of group

} // namespace rmm
} // namespace RMM_EXPORT rmm
5 changes: 3 additions & 2 deletions include/rmm/cuda_device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@

#include <rmm/aligned.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>

#include <cuda_runtime_api.h>

namespace rmm {
namespace RMM_EXPORT rmm {

struct cuda_device_id;
inline cuda_device_id get_current_cuda_device();
Expand Down Expand Up @@ -175,4 +176,4 @@ struct cuda_set_device_raii {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/cuda_stream.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,14 +18,15 @@

#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/detail/logging_assert.hpp>

#include <cuda_runtime_api.h>

#include <functional>
#include <memory>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup cuda_streams
* @{
Expand Down Expand Up @@ -139,4 +140,4 @@ class cuda_stream {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/cuda_stream_pool.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,12 +19,13 @@
#include <rmm/cuda_stream.hpp>
#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>

#include <atomic>
#include <cstddef>
#include <vector>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup cuda_streams
* @{
Expand Down Expand Up @@ -102,4 +103,4 @@ class cuda_stream_pool {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/cuda_stream_view.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@
#pragma once

#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>

#include <cuda/stream_ref>
#include <cuda_runtime_api.h>
Expand All @@ -25,7 +26,7 @@
#include <cstddef>
#include <cstdint>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup cuda_streams
* @{
Expand Down Expand Up @@ -201,4 +202,4 @@ inline std::ostream& operator<<(std::ostream& os, cuda_stream_view stream)
}

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
6 changes: 4 additions & 2 deletions include/rmm/detail/nvtx/ranges.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@

#pragma once

#include <rmm/detail/export.hpp>

#include <nvtx3/nvtx3.hpp>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @brief Tag type for librmm's NVTX domain.
*/
Expand All @@ -41,7 +43,7 @@ struct librmm_domain {
*/
using scoped_range = ::nvtx3::scoped_range_in<librmm_domain>;

} // namespace rmm
} // namespace RMM_EXPORT rmm

/**
* @brief Convenience macro for generating an NVTX range in the `librmm` domain
Expand Down
7 changes: 4 additions & 3 deletions include/rmm/device_buffer.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@
#include <rmm/cuda_device.hpp>
#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

Expand All @@ -29,7 +30,7 @@
#include <stdexcept>
#include <utility>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup data_containers
* @{
Expand Down Expand Up @@ -479,4 +480,4 @@ class device_buffer {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
5 changes: 3 additions & 2 deletions include/rmm/device_scalar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
#pragma once

#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/device_uvector.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>

#include <type_traits>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup data_containers
* @{
Expand Down Expand Up @@ -277,4 +278,4 @@ class device_scalar {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/device_uvector.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,6 +19,7 @@
#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/detail/exec_check_disable.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/device_buffer.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>
Expand All @@ -28,7 +29,7 @@
#include <cstddef>
#include <vector>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup data_containers
* @{
Expand Down Expand Up @@ -565,4 +566,4 @@ class device_uvector {
};

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
7 changes: 4 additions & 3 deletions include/rmm/device_vector.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,12 +16,13 @@

#pragma once

#include <rmm/detail/export.hpp>
#include <rmm/detail/thrust_namespace.h>
#include <rmm/mr/device/thrust_allocator_adaptor.hpp>

#include <thrust/device_vector.h>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup thrust_integrations
* @{
Expand All @@ -35,4 +36,4 @@ template <typename T>
using device_vector = thrust::device_vector<T, rmm::mr::thrust_allocator<T>>;

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
6 changes: 4 additions & 2 deletions include/rmm/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

#pragma once

#include <rmm/detail/export.hpp>

#include <stdexcept>
#include <string>

namespace rmm {
namespace RMM_EXPORT rmm {

/**
* @brief Exception thrown when logical precondition is violated.
Expand Down Expand Up @@ -109,4 +111,4 @@ class out_of_range : public std::out_of_range {
using std::out_of_range::out_of_range;
};

} // namespace rmm
} // namespace RMM_EXPORT rmm
5 changes: 3 additions & 2 deletions include/rmm/exec_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
#pragma once

#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/detail/thrust_namespace.h>
#include <rmm/mr/device/thrust_allocator_adaptor.hpp>
#include <rmm/resource_ref.hpp>

#include <thrust/system/cuda/execution_policy.h>
#include <thrust/version.h>

namespace rmm {
namespace RMM_EXPORT rmm {
/**
* @addtogroup thrust_integrations
* @{
Expand Down Expand Up @@ -97,4 +98,4 @@ using exec_policy_nosync =
#endif

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
8 changes: 5 additions & 3 deletions include/rmm/logger.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,6 +16,8 @@

#pragma once

#include <rmm/detail/export.hpp>

#include <fmt/format.h>
#include <fmt/ostream.h>
#include <spdlog/sinks/basic_file_sink.h>
Expand All @@ -25,7 +27,7 @@
#include <iostream>
#include <string>

namespace rmm {
namespace RMM_EXPORT rmm {

namespace detail {

Expand Down Expand Up @@ -125,7 +127,7 @@ inline spdlog::logger& logger()

//! @endcond

} // namespace rmm
} // namespace RMM_EXPORT rmm

// Doxygen doesn't like this because we're overloading something from fmt
//! @cond Doxygen_Suppress
Expand Down
5 changes: 3 additions & 2 deletions include/rmm/prefetch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@

#include <rmm/cuda_device.hpp>
#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/export.hpp>
#include <rmm/error.hpp>

#include <cuda/std/span>

namespace rmm {
namespace RMM_EXPORT rmm {

/**
* @addtogroup utilities
Expand Down Expand Up @@ -74,4 +75,4 @@ void prefetch(cuda::std::span<T const> data,

/** @} */ // end of group

} // namespace rmm
} // namespace RMM_EXPORT rmm
6 changes: 4 additions & 2 deletions include/rmm/resource_ref.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
*/
#pragma once

#include <rmm/detail/export.hpp>

#include <cuda/memory_resource>

namespace rmm {
namespace RMM_EXPORT rmm {

/**
* @addtogroup memory_resources
Expand Down Expand Up @@ -64,4 +66,4 @@ using host_device_async_resource_ref =
cuda::mr::async_resource_ref<cuda::mr::host_accessible, cuda::mr::device_accessible>;

/** @} */ // end of group
} // namespace rmm
} // namespace RMM_EXPORT rmm
4 changes: 4 additions & 0 deletions python/rmm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@ rapids_cython_init()
# pass through logging level to spdlog
add_compile_definitions("SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${RMM_LOGGING_LEVEL}")

# mark all symbols hidden by default
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_C_VISIBILITY_PRESET hidden)

add_subdirectory(rmm/_cuda)
add_subdirectory(rmm/_lib)