MCPcopy Create free account
hub / github.com/ml-explore/mlx / power

Function power

mlx/ops.cpp:3863–3871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3861}
3862
3863array power(const array& a, const array& b, StreamOrDevice s /* = {} */) {
3864 auto dtype = promote_types(a.dtype(), b.dtype());
3865 std::vector<array> inputs = {astype(a, dtype, s), astype(b, dtype, s)};
3866 if (a.shape() != b.shape()) {
3867 inputs = broadcast_arrays(inputs, s);
3868 }
3869 return array(
3870 inputs[0].shape(), dtype, std::make_shared<Power>(to_stream(s)), inputs);
3871}
3872
3873array cumsum(
3874 const array& a,

Callers 13

init_arrayFunction · 0.85
init_opsFunction · 0.85
vjpMethod · 0.85
jvpMethod · 0.85
vmapMethod · 0.85
vjpMethod · 0.85
vector_normFunction · 0.85
pack_and_quantizeFunction · 0.85
fp_quantizeFunction · 0.85
fp_dequantizeFunction · 0.85
ops_tests.cppFile · 0.85
random_tests.cppFile · 0.85

Calls 5

promote_typesFunction · 0.85
astypeFunction · 0.85
broadcast_arraysFunction · 0.85
to_streamFunction · 0.85
arrayFunction · 0.70

Tested by

no test coverage detected