MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RoundUpToNearest

Function RoundUpToNearest

tensorflow/stream_executor/cuda/redzone_allocator.cc:37–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35// then multiplying by the divisor. For example: RoundUpToNearest(13, 8) => 16
36template <typename T>
37static T RoundUpToNearest(T value, T divisor) {
38 return tensorflow::MathUtil::CeilOfRatio(value, divisor) * divisor;
39}
40
41// The size of the redzone at the end of the user buffer is rounded up to a
42// multiple of kRhsRedzoneAlign. This simplifies the implementation a bit.

Callers 2

RedzoneAllocatorMethod · 0.70
AllocateBytesMethod · 0.70

Calls 1

CeilOfRatioFunction · 0.50

Tested by

no test coverage detected