Aug 25, 2025
Tags: tensorRT, torch, easydiffusion, ggml, cuda, vulkan
Experimented with TensorRT-RTX (a new library offered by NVIDIA).
The first step was a tiny toy model, just to get the build and test setup working.
The reference model in PyTorch:
import torch
import torch.nn as nn
class TinyCNN(nn.Module):
def __init__(self):
super().__init__()
self.conv = nn.Conv2d(3, 8, 3, stride=1, padding=1)
self.relu = nn.ReLU()
self.pool = nn.AdaptiveAvgPool2d((1, 1))
self.fc = nn.Linear(8, 4) # 4-class toy output
def forward(self, x):
x = self.relu(self.conv(x))
x = self.pool(x).flatten(1)
return self.fc(x)
I ran this on a NVIDIA 4060 8 GB (Laptop) for 10K iterations, on Windows and WSL-with-Ubuntu, with float32 data.
Jan 13, 2025
Tags: easydiffusion, torchruntime, torch, ml
Spent the last few days writing torchruntime, which will automatically install the correct torch distribution based on the user’s OS and graphics card. This package was written by extracting this logic out of Easy Diffusion, and refactoring it into a cleaner implementation (with tests).
It can be installed (on Win/Linux/Mac) using pip install torchruntime
.
The main intention is that it’ll be easier for developers to contribute updates (for e.g. for newer or older GPUs). It wasn’t easy to find or modify this code previously, since it was buried deep inside Easy Diffusion’s internals.