Skip to main content
Log in

PyTorch types

#include "max/c/pytorch/types.h"
#include "max/c/pytorch/types.h"

Typedefs

M_TorchInputSpec

typedef struct M_TorchInputSpec M_TorchInputSpec

A specification for a TorchScript input.

M_TorchInputSpec defines shapes, ranks, and data types of the inputs for which the model will be compiled. You must create an instance of this for every input of the model, using M_newTorchInputSpec(), and then pass them all to M_setTorchInputSpecs. For example code, see M_newTorchInputSpec().

When you’re done, call M_freeTorchInputSpec().

M_TorchCustomOpSchemas

typedef struct M_TorchCustomOpSchemas M_TorchCustomOpSchemas

A specification for torch custom operations.

M_TorchCustomOpSchemas defines a vector of strings describing the schema, which includes the namespace, name, overload and signature of an operation, as torch expects it.

When you’re done, call M_freeTorchCustomOpSchemas().

Was this page helpful?