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

Remove deprecated factory functions from resource adaptors. #1767

Merged
Merged
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
19 changes: 0 additions & 19 deletions include/rmm/mr/device/limiting_resource_adaptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,25 +194,6 @@ class limiting_resource_adaptor final : public device_memory_resource {
std::size_t alignment_;
};

/**
* @brief Convenience factory to return a `limiting_resource_adaptor` around the
* upstream resource `upstream`.
*
* @tparam Upstream Type of the upstream `device_memory_resource`.
* @param upstream Pointer to the upstream resource
* @param allocation_limit Maximum amount of memory to allocate
* @return The new limiting resource adaptor
*/
template <typename Upstream>
[[deprecated(
"make_limiting_adaptor is deprecated in RMM 24.10. Use the limiting_resource_adaptor constructor "
"instead.")]]
limiting_resource_adaptor<Upstream> make_limiting_adaptor(Upstream* upstream,
std::size_t allocation_limit)
{
return limiting_resource_adaptor<Upstream>{upstream, allocation_limit};
}

/** @} */ // end of group
} // namespace mr
} // namespace RMM_NAMESPACE
46 changes: 0 additions & 46 deletions include/rmm/mr/device/logging_resource_adaptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,52 +334,6 @@ class logging_resource_adaptor final : public device_memory_resource {
///< allocation requests
};

/**
* @brief Convenience factory to return a `logging_resource_adaptor` around the
* upstream resource `upstream`.
*
* @tparam Upstream Type of the upstream `device_memory_resource`.
* @param upstream Pointer to the upstream resource
* @param filename Name of the file to write log info. If not specified,
* retrieves the log file name from the environment variable "RMM_LOG_FILE".
* @param auto_flush If true, flushes the log for every (de)allocation. Warning, this will degrade
* performance.
* @return The new logging resource adaptor
*/
template <typename Upstream>
[[deprecated(
"make_logging_adaptor is deprecated in RMM 24.10. Use the logging_resource_adaptor constructor "
"instead.")]]
logging_resource_adaptor<Upstream> make_logging_adaptor(
Upstream* upstream,
std::string const& filename = logging_resource_adaptor<Upstream>::get_default_filename(),
bool auto_flush = false)
{
return logging_resource_adaptor<Upstream>{upstream, filename, auto_flush};
}

/**
* @brief Convenience factory to return a `logging_resource_adaptor` around the
* upstream resource `upstream`.
*
* @tparam Upstream Type of the upstream `device_memory_resource`.
* @param upstream Pointer to the upstream resource
* @param stream The ostream to write log info.
* @param auto_flush If true, flushes the log for every (de)allocation. Warning, this will degrade
* performance.
* @return The new logging resource adaptor
*/
template <typename Upstream>
[[deprecated(
"make_logging_adaptor is deprecated in RMM 24.10. Use the logging_resource_adaptor constructor "
"instead.")]]
logging_resource_adaptor<Upstream> make_logging_adaptor(Upstream* upstream,
std::ostream& stream,
bool auto_flush = false)
{
return logging_resource_adaptor<Upstream>{upstream, stream, auto_flush};
}

/** @} */ // end of group
} // namespace mr
} // namespace RMM_NAMESPACE
19 changes: 0 additions & 19 deletions include/rmm/mr/device/polymorphic_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,25 +293,6 @@ bool operator!=(stream_allocator_adaptor<A> const& lhs, stream_allocator_adaptor
return not(lhs == rhs);
}

/**
* @brief Factory to construct a `stream_allocator_adaptor` from an existing stream-ordered
* allocator.
*
* @tparam Allocator Type of the stream-ordered allocator
* @param allocator The allocator to use as the underlying allocator of the
* `stream_allocator_adaptor`
* @param stream The stream on which the `stream_allocator_adaptor` will perform (de)allocations
* @return A `stream_allocator_adaptor` wrapping `allocator` and `s`
*/
template <typename Allocator>
[[deprecated(
"make_stream_allocator_adaptor is deprecated in RMM 24.10. Use the stream_allocator_adaptor "
"constructor "
"instead.")]]
auto make_stream_allocator_adaptor(Allocator const& allocator, cuda_stream_view stream)
{
return stream_allocator_adaptor<Allocator>{allocator, stream};
}
/** @} */ // end of group
} // namespace mr
} // namespace RMM_NAMESPACE
17 changes: 0 additions & 17 deletions include/rmm/mr/device/statistics_resource_adaptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,23 +287,6 @@ class statistics_resource_adaptor final : public device_memory_resource {
device_async_resource_ref upstream_;
};

/**
* @brief Convenience factory to return a `statistics_resource_adaptor` around the
* upstream resource `upstream`.
*
* @param upstream Pointer to the upstream resource
* @return The new statistics resource adaptor
*/
template <typename Upstream>
[[deprecated(
"make_statistics_adaptor is deprecated in RMM 24.10. Use the statistics_resource_adaptor "
"constructor "
"instead.")]]
statistics_resource_adaptor<Upstream> make_statistics_adaptor(Upstream* upstream)
{
return statistics_resource_adaptor<rmm::mr::device_memory_resource>{upstream};
}

/** @} */ // end of group
} // namespace mr
} // namespace RMM_NAMESPACE
17 changes: 0 additions & 17 deletions include/rmm/mr/device/tracking_resource_adaptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,23 +283,6 @@ class tracking_resource_adaptor final : public device_memory_resource {
// allocation requests
};

/**
* @brief Convenience factory to return a `tracking_resource_adaptor` around the
* upstream resource `upstream`.
*
* @tparam Upstream Type of the upstream `device_memory_resource`.
* @param upstream Pointer to the upstream resource
* @return The new tracking resource adaptor
*/
template <typename Upstream>
[[deprecated(
"make_tracking_adaptor is deprecated in RMM 24.10. Use the tracking_resource_adaptor constructor "
"instead.")]]
tracking_resource_adaptor<Upstream> make_tracking_adaptor(Upstream* upstream)
{
return tracking_resource_adaptor<Upstream>{upstream};
}

/** @} */ // end of group
} // namespace mr
} // namespace RMM_NAMESPACE
Loading