parameters: (self, op)
docstring: Applies the current device function stack to the given operation.
docstring_summary: Applies the current device function stack to the given operation.
docstring_tokens: Applies the current device function stack to the given operation .
function: def _apply_device_functions(self, op):
      """Applies the current device function stack to the given operation."""
      # Apply any device functions in reverse order, so that the most recently
      # pushed function has the first chance to apply a device to the op.
      # We apply here because the result can depend on the Operation's
      # signature, which is computed in the Operation constructor.
      for device_function in reversed(self._device_function_stack):
        if device_function is None:
          break
        op._set_device(device_function(op))
function_tokens: def _apply_device_functions ( self , op ) : # Apply any device functions in reverse order, so that the most recently # pushed function has the first chance to apply a device to the op. # We apply here because the result can depend on the Operation's # signature, which is computed in the Operation constructor. for device_function in reversed ( self . _device_function_stack ) : if device_function is None : break op . _set_device ( device_function ( op ) )