PyTorch

To use SOL in PyTorch just import the package and optimize the model using sol.optimize(model).

import torch
import sol
import torchvision.models as models

''' Optimizing Model '''
py_model  = models.__dict__["alexnet"]()
input	  = torch.rand(32, 3, 224, 224)

sol_model = sol.optimize(py_model)

''' Run training '''
sol_model.train()

# You cannot initialize the optimizer at this point. You need to wait until
# you have executed the model at least once, so SOL has compiled it.
optimizer = None
for batch in ...:
	input, target = ...
	output = sol_model(input)
	loss = loss_func(output, target)
	# After running the model once, you can safely initialize the optimizer
	if optimizer is None:
		optimizer = torch.optim.Adam(sol_model.parameters(), ...)
	optimizer.zero_grad()
	loss.backward()
	optimizer.step()
	...

''' Run validation '''
sol_model.eval()
with torch.no_grad():
	for batch in ...:
		input = ...
		output = sol_model(input)
		...

This example requires the torchvision package: https://github.com/pytorch/vision/ .

In v0.5.1 we added an lazy evaluation of sol.optimize(...) which removes the necessity to provide an example input. The model instead gets created the first time it gets executed.

By default SOL only optimized the primary execution of the model model(input). If you want to optimize helper functions such as model.predict(...) you need optimize these separately using:

model.predict = torch.compile(model.predict, backend='sol')

Optimizing helper functions requires PyTorch v2. You can also not use sol.optimize(...) as model.predict is a function, not a model and sol.optimize will not be able to identify the correct parser automatically.

PyTorch specific options for sol.optimize

TorchScript

TorchScript has been declared as deprecated and might also be removed in a future SOL release.

Option Default Effect
parser None compile: uses torch.compile, export: uses torch.export, jit: uses torch.jit.script or torch.jit.trace, None: automatically determines which to use. Using torch.compile can add additional overhead to the execution time.
check_trace False When using torch.jit.trace, sets the check_trace argument.
strict False When using torch.jit.trace, sets the strict argument.
trace False When not using torch.compile, enforces using torch.jit.trace. By default uses torch.jit.script.

Torch.FX

Option Default Effect
include_c10d False Allows to integrate c10d distributed calls into the SOL compilation output. Only supports X86 and NVIDIA.
mode None When set to reduce-overhead uses CUDAGraphs on NVIDIA GPUs.

F.A.Q.

How can I use CUDA Graphs with SOL and PyTorch?

CUDA Graphs allow to significantly reduce the overhead when running GPU workloads but come with some restrictions, e.g., no changing dimensions can be used. For more information on CUDA Graphs please refer to this blog post.

To use CUDA Graphs in SOL, just use:

sol_model = torch.compile(pytorch_model, mode='reduce-overhead', backend='sol')
I get the error `Unsupported at::Device: cuda:0`?

This error is raised when SOL was unable to find the CUDA toolkit and you try to execute a model on an NVIDIA GPU. Please verify that SOL is able to find the CUDA toolkit by setting the CUDA_HOME env var.

How do I store/load a Pytorch model?

For storing/loading a SOL PyTorch model, use model.state_dict() and model.load_state_dict(...) methods.

# Storing
sol_model = sol.optimize(pytorch_model, [...])
torch.save(sol_model.state_dict(), PATH)

# Loading
sol_model = sol.optimize(pytorch_model)
sol_model.load_state_dict(torch.load(PATH))

More information on loading/storing the weights can be found here

Can I use torch.compile(...) with SOL?

Yes, with SOL ≥ v0.5.2 and PyTorch ≥ 2.0 you can use torch.compile(model, backend=‘sol’) with SOL! For PyTorch < 2.6 you also need to manually import import sol.pytorch to ensure that SOL is correctly registered as backend into PyTorch.

I get strange errors when running sol.optimize(model, ...), e.g., in Huggingface Transformers.

Please read this guide how to convert the transformer into a TorchScript compatible model.

How can I update/downgrade to another PyTorch version?

Before switching version, please have a look at the compatibility list if your PyTorch version is supported by SOL. If yes, and if you are using SOL with the NEC SX-Aurora TSUBASA, you can switch PyTorch using pip3 install veda-pytorch~={VERSION}. If you are using SOL with any other device, then you can just use pip3 install torch~={VERSION}.

The SOL model returns more outputs than the PyTorch model.

This error occurs, i.e., in TorchVisions Inception V3 or GoogleNet. These models return 1 output in inference and 2 outputs in training mode. SOL relies on the TorchScript parser. Unfortunately the TorchVision models are build in a way that hides the change of output behavior from TorchScript. However, you can implement this yourself as follows:

from torchvision import models

class Wrap(torch.nn.Module):
	def __init__(self, model):
		super().__init__()
		self.model = model

	def forward(self, x):
		out = self.model(x)
		if torch.jit.is_scripting():
			return (out[0], out[1]) if self.training else (out[0], None)
		return (out[0], out[1]) if self.training else (out, None)

model = Wrap(models.inception_v3())

# use only one output
model.training = False
sol_model = sol.optimize(model, ...)

# use two outputs
model.training = True
sol_model = sol.optimize(model, ...)

SOL currently does not support to dynamically switch between these two modes and requires to compile the model for each mode separately.

How can I use Pytorch Lightning with SOL?

You can just pass your Pytorch Lightning model to SOL’s sol.optimize(...) method.

class ResNet50(L.LightningModule):
	def __init__(self):
		super().__init__()
		self.model = sol.optimize(torchvision.models.resnet50())

	def training_step(self, batch, batch_idx):
		...
	
	def configure_optimizers(self):
		...
Can I implement custom layers using SOL?

Please refer to Custom Layers.

I get NotImplementedError: Could not run 'aten::addmm.out' with arguments from the 'VE' backend.' when trying to run an RNN on VE.

Most likely you have used torch.compile(model, backend=“sol”) on an RNN model. Due to this open issue it’s impossible to compile RNNs using the torch.compile API. Please use sol.optimize(model, parser=‘jit’) instead.

Tested Models

TorchVision v0.29.2

alexnet, convnext, deeplabv3, densenet, efficientnet, efficientnet_v2, fcn, fcos, googlenet, inception, lraspp, maxvit, mc3, mnasnet, mobilenet_v2, mobilenet_v3, mvit_v1, mvit_v2, r2plus1d, r3d, regnet_x, regnet_y, resnet, resnext, s3d, shufflenet_v2, squeezenet, swin, swin_v2, swin3d, vgg, vit, wide_resnet

Transformers v5.20.2

Aimv2, Albert, Align, AltCLIP, AltRoberta, Apertus, Arcee, AudioFlamingo3, Bark, Bart, Beit, Bert, BigBird, BigBirdPegasus, BioGpt, BitNet, Blenderbot, BlenderbotSmall, Blip2, Blip, Bloom, BridgeTower, CLIP, CLIPSeg, CTRL, Camembert, ChineseCLIP, Clap, Clvp, CodeGen, ConvNext, ConvNextV2, CpmAnt, Csm, DINOv3, DPT, Data2Vec, Deberta, DebertaV2, DecisionTransformer, DeiT, DiffLlama, Dinov2, DistilBert, Doge, DonutSwin, EfficientNet, Electra, Emu3, Eomt, Ernie4_5, Ernie, Esmc, EuroBert, Evolla, Exaone4, FNet, FSMT, Falcon, FalconH1, Flaubert, Flava, FocalNet, FunAsrNano, GPT2, GPTBigCode, GPTJ, GPTNeo, Gemma2, Gemma3, Gemma, Git, Glm, GlmAsr, GraniteSWA, GroupViT, Gte, Helium, Hrm, HyperCLOVAX, IBert, IJepa, ImageGPT, InstructBlip, InstructBlipVideo, Jais2, Janus, JetMoe, JinaEmbeddingsV3, Kosmos2, Kosmos2_5, LayoutLM, LayoutLMv3, Levit, Lfm2, Lilt, Llama, LongT5, Luke, M2M100, MBart, MLCD, MPNet, MT5, Mamba2, Marian, MarkupLM, MaskFormerSwin, MegatronBert, MetaClip2, Ministral3, Mistral, Mllama, MobileBert, MobileNetV1, MobileNetV2, MobileViT, ModernBert, Molmo2, MossTranscribeDiarize, Mpt, Mra, MusicFlamingo, Mvp, NanoChat, NeoMME, NllbMoe, NomicBert, Nystromformer, OPT, Olmo2, Olmo3, Olmo, OpenAIGPT, OpenAIPrivacyFilter, Ovis2, OwlViT, Owlv2, PLBart, PPFormulaNet, Pegasus, Perceiver, Persimmon, Phi3, Phi4Multimodal, Phi, Pvt, Qwen2, Qwen2Audio, Qwen3, Qwen3ASR, Qwen3VL, Radio, RemBert, RoCBert, RoFormer, Roberta, RobertaPreLayerNorm, Sam3, Sam3LiteText, Sam, SamHQ, SeamlessM4T, SeamlessM4Tv2, Siglip2, SmolLM3, Splinter, SqueezeBert, Starcoder2, Step3p7, SwiftFormer, Swin, Swinv2, SwitchTransformers, T5, Tipsv2, TrOCR, UMT5, Ultrabert, VaultGemma, ViT, ViTMAE, ViTMSN, VibeVoice, VibeVoiceAsr, VideoLlava, VideoPrism, VisualBert, VitDet, Voxtral, Whisper, XCLIP, XGLM, XLM, XLMRoberta, XLMRobertaXL, Xmod, Yoso, Zamba2

TIMM v1.0.30

aimv2, beit3, beit, beitv2, botnet, caformer, cait, coat, coatnet, coatnext, convformer, convit, convmixer, convnext, convnextv2, cpubone, cs3darknet, cs3edgenet, cs3se_edgenet, cs3sedarknet, csatv2, cspdarknet, cspresnet, cspresnext, darknet, davit, deepseek_vit, deit3, deit, densenet, dla, dm_nfnet, dpn, eca_botnext, eca_nfnet, eca_resnet, eca_resnext, eca_vovnet, ecaresnet, ecaresnext, edgenext, efficientformer, efficientformerv2, efficientnet, efficientnetv2, efficientvim, ese_vovnet, eva02, eva, fasternet, fastvit, fbnet, flexivit, focalnet, gc_efficientnetv2, gcresnet, gcresnext, gcvit, ghostnet, ghostnetv2, ghostnetv3, gmixer, gmlp, hardcorenas, hgnet, hgnetv2, hiera, hrnet, iformer, inception, inception_next, lcnet, lcnetv2, legacy, levit, levit_conv, lowformer, mambaout, maxvit, maxxvit, maxxvitv2, mixer, mixnet, mnasnet, mobilenet_edgetpu, mobilenetv1, mobilenetv2, mobilenetv3, mobilenetv4, mobilenetv5, mobileone, mobilevit, mobilevitv2, mvitv2, naflexvit, nasnet, nest, nextvit, nf_ecaresnet, nf_regnet, nf_resnet, nf_seresnet, nfnet, pit, pnasnet, poolformer, poolformerv2, pvt_v2, qwen3_vit, rdnet, regnetv, regnetx, regnety, regnetz, repghostnet, repvgg, repvit, res2net, res2next, resmlp, resnest, resnet, resnetaa, resnetrs, resnetv2, resnext, rexnet, rexnetr, samvit, sebotnet, sedarknet, selecsls, semnasnet, senet, sequencer2d, seresnet, seresnetaa, seresnext, seresnextaa, shvit, skresnet, skresnext, spnasnet, starnet, swiftformer, swin, swinv2, test, tf_efficientnet, tf_efficientnetv2, tf_mixnet, tf_mobilenetv3, tiny_vit, tinynet, twins_pcpvt, twins_svt, vgg, visformer, vit, vitamin, vovnet, wide_resnet, xception, xcit

torch.hub

ultralytics/yolov5[n, s, m, l, x, n6, s6, m6, l6, x6], mateuszbuda/brain-segmentation-pytorch/unet

Supported Layers

Please refer to https://pytorch.org/docs/stable/ for how these functions are used. This documentation only contains which layers, functions and tensor functionality is currently implemented within SOL.

TorchScript (torch.jit.trace/torch.jit.script)

aten::Bool, aten::Float, aten::Int, aten::IntImplicit, aten::ScalarImplicit, aten::__and__, aten::__contains__, aten::__derive_index, aten::__getitem__, aten::__is__, aten::__isnot__, aten::__not__, aten::__or__, aten::__range_length, aten::_convolution, aten::_set_item, aten::_unique2, aten::abs, aten::absolute, aten::acos, aten::acosh, aten::adaptive_avg_pool1d, aten::adaptive_avg_pool2d, aten::adaptive_avg_pool3d, aten::adaptive_max_pool1d, aten::adaptive_max_pool2d, aten::adaptive_max_pool3d, aten::add, aten::addbmm, aten::addcdiv, aten::addcmul, aten::addmm, aten::all, aten::alpha_dropout, aten::amax, aten::amin, aten::any, aten::append, aten::arange, aten::arccos, aten::arccosh, aten::arcsin, aten::arcsinh, aten::arctan, aten::arctanh, aten::argmax, aten::argmin, aten::as_strided, aten::as_tensor, aten::asin, aten::asinh, aten::atan2, aten::atan, aten::atanh, aten::avg_pool1d, aten::avg_pool2d, aten::avg_pool3d, aten::backward, aten::baddbmm, aten::batch_norm, aten::bernoulli, aten::binary_cross_entropy, aten::binary_cross_entropy_with_logits, aten::bitwise_and, aten::bitwise_left_shift, aten::bitwise_not, aten::bitwise_or, aten::bitwise_right_shift, aten::bitwise_xor, aten::bmm, aten::broadcast_tensors, aten::broadcast_to, aten::bucketize, aten::cat, aten::ceil, aten::celu, aten::chunk, aten::clamp, aten::clamp_max, aten::clamp_min, aten::clone, aten::complex, aten::concat, aten::constant_pad_nd, aten::contiguous, aten::conv1d, aten::conv2d, aten::conv3d, aten::conv_transpose1d, aten::conv_transpose2d, aten::conv_transpose3d, aten::copy, aten::cos, aten::cosh, aten::cosine_embedding_loss, aten::cross, aten::cross_entropy_loss, aten::cumsum, aten::dequantize, aten::detach, aten::device, aten::dict, aten::dim, aten::div, aten::divide, aten::dot, aten::dropout, aten::einsum, aten::elu, aten::embedding, aten::empty, aten::empty_like, aten::eq, aten::equal, aten::erf, aten::erfc, aten::exp2, aten::exp, aten::expand, aten::expand_as, aten::expm1, aten::extend, aten::eye, aten::fft_fft2, aten::fft_fft, aten::fft_fftn, aten::fft_hfft, aten::fft_ifft2, aten::fft_ifft, aten::fft_ifftn, aten::fft_ihfft, aten::fft_irfft2, aten::fft_irfft, aten::fft_irfftn, aten::fft_rfft2, aten::fft_rfft, aten::fft_rfftn, aten::fill, aten::flatten, aten::flip, aten::floor, aten::floor_divide, aten::floordiv, aten::fmod, aten::format, aten::frobenius_norm, aten::full, aten::full_like, aten::gather, aten::ge, aten::gelu, aten::grad, aten::greater, aten::greater_equal, aten::group_norm, aten::gru, aten::gru_cell, aten::gt, aten::hardshrink, aten::hardsigmoid, aten::hardswish, aten::hardtanh, aten::hinge_embedding_loss, aten::huber_loss, aten::imag, aten::index, aten::index_add, aten::index_put, aten::index_put_, aten::index_select, aten::instance_norm, aten::is_autocast_enabled, aten::is_floating_point, aten::isfinite, aten::isinf, aten::isnan, aten::items, aten::kl_div, aten::l1_loss, aten::layer_norm, aten::le, aten::leaky_relu, aten::len, aten::lift_fresh, aten::linalg_cross, aten::linalg_matrix_norm, aten::linalg_norm, aten::linalg_vector_norm, aten::linear, aten::linspace, aten::list, aten::log10, aten::log1p, aten::log2, aten::log, aten::log_sigmoid, aten::log_softmax, aten::logaddexp2, aten::logaddexp, aten::logical_and, aten::logical_not, aten::logical_or, aten::logical_xor, aten::lstm, aten::lstm_cell, aten::lt, aten::mT, aten::margin_ranking_loss, aten::masked_fill, aten::matmul, aten::max, aten::max_pool1d, aten::max_pool1d_with_indices, aten::max_pool2d, aten::max_pool2d_with_indices, aten::max_pool3d, aten::max_pool3d_with_indices, aten::max_unpool1d, aten::max_unpool2d, aten::max_unpool3d, aten::maximum, aten::mean, aten::meshgrid, aten::min, aten::minimum, aten::mm, aten::mse_loss, aten::mul, aten::multilabel_margin_loss, aten::multiply, aten::nanmean, aten::nansum, aten::narrow, aten::narrow_copy, aten::ne, aten::neg, aten::negative, aten::new_full, aten::new_zeros, aten::nll_loss_nd, aten::norm, aten::not_equal, aten::nuclear_norm, aten::numel, aten::one_hot, aten::ones, aten::ones_like, aten::pad, aten::percentFormat, aten::permute, aten::pixel_shuffle, aten::poisson_nll_loss, aten::pow, aten::prelu, aten::prod, aten::quantize_per_tensor, aten::rand, aten::rand_like, aten::randint, aten::randint_like, aten::randn, aten::randn_like, aten::real, aten::reciprocal, aten::relu6, aten::relu, aten::remainder, aten::repeat, aten::repeat_interleave, aten::requires_grad_, aten::reshape, aten::reshape_as, aten::rms_norm, aten::rnn_relu, aten::rnn_relu_cell, aten::rnn_tanh, aten::rnn_tanh_cell, aten::roll, aten::round, aten::rrelu, aten::rsqrt, aten::rsub, aten::scaled_dot_product_attention, aten::scatter, aten::scatter_add, aten::scatter_reduce, aten::select, aten::select_scatter, aten::selu, aten::sigmoid, aten::sign, aten::silu, aten::sin, aten::sinh, aten::size, aten::slice, aten::smooth_l1_loss, aten::soft_margin_loss, aten::softmax, aten::softmin, aten::softplus, aten::softshrink, aten::split, aten::split_with_sizes, aten::sqrt, aten::square, aten::squeeze, aten::stack, aten::std, aten::str, aten::sub, aten::sum, aten::t, aten::tan, aten::tanh, aten::tensor, aten::tensor_split, aten::tensordot, aten::tile, aten::to, aten::to_mkldnn, aten::topk, aten::transpose, aten::tril, aten::triplet_margin_loss, aten::triu, aten::type_as, aten::unbind, aten::unflatten, aten::uniform, aten::unsqueeze, aten::upsample_bicubic2d, aten::upsample_bilinear2d, aten::upsample_linear1d, aten::upsample_nearest1d, aten::upsample_nearest2d, aten::upsample_nearest3d, aten::upsample_trilinear3d, aten::values, aten::var, aten::view, aten::view_as_complex, aten::view_as_real, aten::warn, aten::where, aten::zero, aten::zeros, aten::zeros_like, prim::CallFunction, prim::CallMethod, prim::Constant, prim::ConstantMKLDNNTensor, prim::CreateObject, prim::DictConstruct, prim::Enter, prim::Exit, prim::GetAttr, prim::If, prim::ListConstruct, prim::ListIndex, prim::ListUnpack, prim::Loop, prim::ModuleContainerIndex, prim::NumToTensor, prim::Print, prim::PythonOp, prim::RaiseException, prim::SetAttr, prim::TupleConstruct, prim::TupleIndex, prim::TupleUnpack, prim::Uninitialized, prim::device, prim::dtype, prim::grad, prim::is_nested, prim::isinstance, prim::layout, prim::max, prim::min, prim::type, prim::unchecked_cast, quantized::conv2d, quantized::conv2d_relu

torch.fx (torch.compile and torch.export)

torch._ops.aten and torch.Tensor operators get automatically mapped onto other torch.fx operators if not listed here.

_operator.abs, _operator.add, _operator.and_, _operator.div, _operator.eq, _operator.floordiv, _operator.ge, _operator.getitem, _operator.gt, _operator.iadd, _operator.imul, _operator.invert, _operator.isub, _operator.itruediv, _operator.le, _operator.lt, _operator.matmul, _operator.mod, _operator.mul, _operator.ne, _operator.neg, _operator.not_, _operator.or_, _operator.pow, _operator.setitem, _operator.sub, _operator.truediv, builtins.getattr, einops.einops.rearrange, einops.einops.reduce, einops.einops.repeat, math.ceil, torch.Size, torch.Tensor.__abs__, torch.Tensor.__and__, torch.Tensor.__eq__, torch.Tensor.__or__, torch.Tensor.bfloat16, torch.Tensor.bool, torch.Tensor.byte, torch.Tensor.cdouble, torch.Tensor.cfloat, torch.Tensor.char, torch.Tensor.contiguous, torch.Tensor.copy_, torch.Tensor.cpu, torch.Tensor.cuda, torch.Tensor.detach, torch.Tensor.double, torch.Tensor.expand, torch.Tensor.expand_as, torch.Tensor.fill_, torch.Tensor.fill_diagonal_, torch.Tensor.float, torch.Tensor.fmax, torch.Tensor.fmin, torch.Tensor.fmod, torch.Tensor.half, torch.Tensor.index_put_, torch.Tensor.int, torch.Tensor.item, torch.Tensor.long, torch.Tensor.narrow, torch.Tensor.new_empty, torch.Tensor.new_full, torch.Tensor.new_ones, torch.Tensor.new_tensor, torch.Tensor.new_zeros, torch.Tensor.reciprocal, torch.Tensor.repeat, torch.Tensor.requires_grad_, torch.Tensor.reshape_as, torch.Tensor.roll, torch.Tensor.short, torch.Tensor.size, torch.Tensor.softmin, torch.Tensor.sum, torch.Tensor.t, torch.Tensor.to, torch.Tensor.type, torch.Tensor.type_as, torch.Tensor.uniform, torch.Tensor.view, torch.Tensor.view_as, torch.Tensor.zero_, torch._C.TensorBase.set_, torch._C._autograd._get_data_attr, torch._C._autograd._saved_tensors_hooks_disable, torch._C._autograd._saved_tensors_hooks_enable, torch._C._fft.fft_fft, torch._C._fft.fft_fft2, torch._C._fft.fft_fftn, torch._C._fft.fft_hfft, torch._C._fft.fft_hfft2, torch._C._fft.fft_hfftn, torch._C._fft.fft_ifft, torch._C._fft.fft_ifft2, torch._C._fft.fft_ifftn, torch._C._fft.fft_ihfft, torch._C._fft.fft_ihfft2, torch._C._fft.fft_ihfftn, torch._C._fft.fft_irfft, torch._C._fft.fft_irfft2, torch._C._fft.fft_irfftn, torch._C._fft.fft_rfft, torch._C._fft.fft_rfft2, torch._C._fft.fft_rfftn, torch._C._functorch._add_batch_dim, torch._C._functorch._remove_batch_dim, torch._C._functorch._vmap_decrement_nesting, torch._C._functorch._vmap_increment_nesting, torch._C._functorch.set_inplace_requires_grad_allowed, torch._C._linalg.linalg_cross, torch._C._linalg.linalg_matrix_norm, torch._C._linalg.linalg_norm, torch._C._linalg.linalg_vecdot, torch._C._linalg.linalg_vector_norm, torch._C._log_api_usage_once, torch._C._nn.avg_pool2d, torch._C._nn.avg_pool3d, torch._C._nn.gelu, torch._C._nn.linear, torch._C._nn.log_sigmoid, torch._C._nn.one_hot, torch._C._nn.pad, torch._C._nn.scaled_dot_product_attention, torch._C._nn.softplus, torch._C._nn.softshrink, torch._C._set_grad_enabled, torch._assert, torch._check_is_size, torch._dynamo.variables.builtin._lower_version_count_by_1, torch._functorch.autograd_function.autograd_function_apply, torch._functorch.predispatch._add_batch_dim, torch._functorch.predispatch._remove_batch_dim, torch._functorch.predispatch._vmap_decrement_nesting, torch._functorch.predispatch._vmap_increment_nesting, torch._functorch.predispatch.lazy_load_decompositions, torch._functorch.vmap.lazy_load_decompositions, torch._ops._C.fused_add_rms_norm, torch._ops._C.rms_norm, torch._ops._C.rotary_embedding, torch._ops._C.silu_and_mul, torch._ops._c10d_functional.all_gather_into_tensor, torch._ops._c10d_functional.all_gather_into_tensor_coalesced, torch._ops._c10d_functional.all_reduce, torch._ops._c10d_functional.all_reduce_coalesced, torch._ops._c10d_functional.all_to_all_single, torch._ops._c10d_functional.broadcast, torch._ops._c10d_functional.reduce_scatter_tensor, torch._ops._c10d_functional.reduce_scatter_tensor_coalesced, torch._ops._c10d_functional.wait_tensor, torch._ops.aten._assert_scalar.default, torch._ops.aten._assert_tensor_metadata.default, torch._ops.aten._unique2.default, torch._ops.aten.adaptive_max_pool1d.default, torch._ops.aten.adaptive_max_pool2d.default, torch._ops.aten.adaptive_max_pool3d.default, torch._ops.aten.alias.default, torch._ops.aten.batch_norm.default, torch._ops.aten.copy_.default, torch._ops.aten.einsum.default, torch._ops.aten.embedding.default, torch._ops.aten.group_norm.default, torch._ops.aten.index.Tensor, torch._ops.aten.instance_norm.default, torch._ops.aten.l1_loss.default, torch._ops.aten.layer_norm.default, torch._ops.aten.lift_fresh_copy.default, torch._ops.aten.mT.default, torch._ops.aten.mse_loss.default, torch._ops.aten.nonzero_numpy.default, torch._ops.aten.numpy_T, torch._ops.aten.select.int, torch._ops.aten.shallow_copy_data_, torch._ops.aten.slice.Tensor, torch._ops.aten.smooth_l1_loss.default, torch._ops.aten.split_with_sizes.default, torch._ops.aten.sym_size.int, torch._ops.aten.tensordot.default, torch._ops.aten.unique_consecutive.default, torch._ops.aten.upsample_bilinear2d.vec, torch._ops.aten.upsample_linear1d.vec, torch._ops.aten.upsample_nearest1d.vec, torch._ops.aten.upsample_nearest2d.vec, torch._ops.aten.upsample_nearest3d.vec, torch._ops.aten.upsample_trilinear3d.vec, torch._ops.flash_attn._flash_attn_forward, torch._ops.sol.custom, torch._refs.tensor, torch.abs, torch.absolute, torch.acos, torch.acosh, torch.adaptive_avg_pool1d, torch.adaptive_avg_pool2d, torch.adaptive_avg_pool3d, torch.add, torch.addbmm, torch.addcdiv, torch.addcmul, torch.addmm, torch.all, torch.amax, torch.amin, torch.amp.autocast_mode._enter_autocast, torch.amp.autocast_mode._exit_autocast, torch.any, torch.arange, torch.arccos, torch.arccosh, torch.arcsin, torch.arcsinh, torch.arctan, torch.arctanh, torch.argmax, torch.argmin, torch.argsort, torch.as_strided, torch.as_tensor, torch.asin, torch.asinh, torch.atan, torch.atan2, torch.atanh, torch.autograd.function.FunctionCtx, torch.avg_pool1d, torch.avg_pool2d, torch.avg_pool3d, torch.baddbmm, torch.bernoulli, torch.bernoulli_, torch.bitwise_and, torch.bitwise_left_shift, torch.bitwise_not, torch.bitwise_or, torch.bitwise_right_shift, torch.bitwise_xor, torch.bmm, torch.broadcast_to, torch.bucketize, torch.cat, torch.ceil, torch.chunk, torch.clamp, torch.clamp_max, torch.clamp_min, torch.clip, torch.clone, torch.complex, torch.concat, torch.concatenate, torch.conv1d, torch.conv2d, torch.conv3d, torch.conv_transpose1d, torch.conv_transpose2d, torch.conv_transpose3d, torch.cos, torch.cosh, torch.cross, torch.cumsum, torch.div, torch.divide, torch.dot, torch.empty, torch.empty_like, torch.eq, torch.equal, torch.erf, torch.erfc, torch.exp, torch.expm1, torch.eye, torch.flatten, torch.flip, torch.floor, torch.floor_divide, torch.full, torch.full_like, torch.functional.broadcast_tensors, torch.functional.einsum, torch.functional.meshgrid, torch.functional.norm, torch.functional.split, torch.functional.tensordot, torch.functional.unique, torch.functional.unique_consecutive, torch.gather, torch.ge, torch.getitem, torch.greater, torch.greater_equal, torch.gt, torch.hardshrink, torch.imag, torch.index_put, torch.index_select, torch.isfinite, torch.isinf, torch.isnan, torch.le, torch.less, torch.less_equal, torch.linspace, torch.log, torch.log10, torch.log1p, torch.log2, torch.log_softmax, torch.logaddexp, torch.logaddexp2, torch.logical_and, torch.logical_not, torch.logical_or, torch.logical_xor, torch.logsumexp, torch.lstm, torch.lstm_cell, torch.lt, torch.masked_fill, torch.masked_select, torch.matmul, torch.max, torch.maximum, torch.mean, torch.min, torch.minimum, torch.mm, torch.mul, torch.multiply, torch.nanmean, torch.nansum, torch.ne, torch.neg, torch.negative, torch.nn.functional.adaptive_avg_pool1d, torch.nn.functional.adaptive_avg_pool2d, torch.nn.functional.adaptive_avg_pool3d, torch.nn.functional.adaptive_max_pool1d, torch.nn.functional.adaptive_max_pool2d, torch.nn.functional.adaptive_max_pool3d, torch.nn.functional.alpha_dropout, torch.nn.functional.avg_pool1d, torch.nn.functional.avg_pool2d, torch.nn.functional.avg_pool3d, torch.nn.functional.batch_norm, torch.nn.functional.binary_cross_entropy, torch.nn.functional.binary_cross_entropy_with_logits, torch.nn.functional.celu, torch.nn.functional.conv1d, torch.nn.functional.conv2d, torch.nn.functional.conv3d, torch.nn.functional.cosine_embedding_loss, torch.nn.functional.cross_entropy, torch.nn.functional.dropout, torch.nn.functional.elu, torch.nn.functional.embedding, torch.nn.functional.gaussian_nll_loss, torch.nn.functional.gelu, torch.nn.functional.glu, torch.nn.functional.group_norm, torch.nn.functional.hardsigmoid, torch.nn.functional.hardswish, torch.nn.functional.hardtanh, torch.nn.functional.hinge_embedding_loss, torch.nn.functional.huber_loss, torch.nn.functional.instance_norm, torch.nn.functional.interpolate, torch.nn.functional.kl_div, torch.nn.functional.l1_loss, torch.nn.functional.layer_norm, torch.nn.functional.leaky_relu, torch.nn.functional.linear, torch.nn.functional.local_response_norm, torch.nn.functional.log_softmax, torch.nn.functional.lp_pool1d, torch.nn.functional.lp_pool2d, torch.nn.functional.lp_pool3d, torch.nn.functional.margin_ranking_loss, torch.nn.functional.max_pool1d, torch.nn.functional.max_pool2d, torch.nn.functional.max_pool2d_with_indices, torch.nn.functional.max_pool3d, torch.nn.functional.max_pool3d_with_indices, torch.nn.functional.max_unpool1d, torch.nn.functional.max_unpool2d, torch.nn.functional.max_unpool3d, torch.nn.functional.mse_loss, torch.nn.functional.multilabel_margin_loss, torch.nn.functional.multilabel_soft_margin_loss, torch.nn.functional.nll_loss, torch.nn.functional.normalize, torch.nn.functional.pad, torch.nn.functional.poisson_nll_loss, torch.nn.functional.relu, torch.nn.functional.relu6, torch.nn.functional.rrelu, torch.nn.functional.selu, torch.nn.functional.silu, torch.nn.functional.smooth_l1_loss, torch.nn.functional.soft_margin_loss, torch.nn.functional.softmax, torch.nn.functional.softmin, torch.nn.functional.softsign, torch.nn.functional.tanh, torch.nn.functional.tanhshrink, torch.nn.functional.triplet_margin_loss, torch.nn.functional.triplet_margin_with_distance_loss, torch.nonzero, torch.norm, torch.not_equal, torch.numel, torch.ones, torch.ones_like, torch.ops.higher_order.autograd_function_apply, torch.ops.higher_order.tag_activation_checkpoint, torch.outer, torch.permute, torch.pixel_shuffle, torch.pow, torch.prelu, torch.prod, torch.quantize_per_tensor, torch.rand, torch.rand_like, torch.randint, torch.randint_like, torch.real, torch.relu, torch.repeat_interleave, torch.reshape, torch.rms_norm, torch.rnn_relu, torch.rnn_relu_cell, torch.rnn_tanh, torch.rnn_tanh_cell, torch.roll, torch.round, torch.rsqrt, torch.rsub, torch.scalar_tensor, torch.scatter, torch.scatter_add, torch.scatter_reduce, torch.select_scatter, torch.sigmoid, torch.sign, torch.sin, torch.sinh, torch.softmax, torch.sort, torch.split, torch.sqrt, torch.square, torch.squeeze, torch.stack, torch.std, torch.sub, torch.subtract, torch.sum, torch.swapaxes, torch.sym_int, torch.sym_max, torch.sym_min, torch.sym_sum, torch.tan, torch.tanh, torch.tensor, torch.tensor_split, torch.tile, torch.topk, torch.transpose, torch.tril, torch.triu, torch.true_divide, torch.truediv, torch.unbind, torch.unflatten, torch.unsqueeze, torch.var, torch.view_as_complex, torch.view_as_real, torch.where, torch.zeros, torch.zeros_like