MCPcopy Index your code
hub / github.com/zai-org/CogView / divide

Function divide

mpu/utils.py:26–30  ·  view source on GitHub ↗

Ensure that numerator is divisible by the denominator and return the division value.

(numerator, denominator)

Source from the content-addressed store, hash-verified

24
25
26def divide(numerator, denominator):
27 """Ensure that numerator is divisible by the denominator and return
28 the division value."""
29 ensure_divisibility(numerator, denominator)
30 return numerator // denominator
31
32
33def split_tensor_along_last_dim(tensor, num_partitions,

Callers 7

__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls 1

ensure_divisibilityFunction · 0.85

Tested by

no test coverage detected