Home / Class/ typed Class — pytorch Architecture

typed Class — pytorch Architecture

Architecture documentation for the typed class in Dispatcher.h from the pytorch codebase.

Entity Profile

Source Code

aten/src/ATen/core/dispatch/Dispatcher.h lines 520–536

  template <class FuncType>
  TypedOperatorHandle<FuncType> typed() const {
    // NB: This assert is not 100% sound: you can retrieve a typed() operator
    // handle prior to ANY C++ signature being registered on the operator
    // and the check will say everything is OK (at which point you can then
    // smuggle in a kernel that is typed incorrectly).  For everything
    // in core library this won't happen, because all the static registrations
    // will be done by the time a typed() handle is acquired.
#if !defined C10_MOBILE
    operatorDef_->op.assertSignatureIsCorrect<FuncType>();
    if (fn_has_symint<FuncType>::value) {
      operatorDef_->op.assertSignatureIsCorrect<
          typename fn_remove_symint<FuncType>::type>();
    }
#endif
    return TypedOperatorHandle<FuncType>(operatorIterator_);
  }

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free