MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / softmax_lower

Function softmax_lower

imperative/python/megengine/xla/rules/nn.py:731–735  ·  view source on GitHub ↗
(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]])

Source from the content-addressed store, hash-verified

729
730@register_lower_rule(mops.Softmax)
731def softmax_lower(ctx, *args: Union[HLOTensor, Sequence[HLOTensor]]):
732 assert (
733 len(args) == 1 and len(ctx.vars_in) == 1 and len(ctx.vars_out) == 1
734 ), f"{len(args)}, {len(ctx.vars_in)}, {len(ctx.vars_out)}"
735 return softmax(args[0], ctx.op.axis)
736
737
738@register_lower_rule("SoftmaxBackward")

Callers

nothing calls this directly

Calls 1

softmaxFunction · 0.70

Tested by

no test coverage detected