# Profiling in PyTorch (Part 2): From nn.Linear to a Fused MLP

DevFeed: [Profiling in PyTorch (Part 2): From nn.Linear to a Fused MLP](<https://devfeed.tech/articles/profiling-in-pytorch-part-2-from-nn-linear-to-a-fused-mlp-7522.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/torch-mlp-fusion>)

Author: Aritra Roy Gosthipaty; Rémi Ouazan Reboul; Sergio Paniego; Pedro Cuenca; Sayak Paul

Published: 2026-06-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Hugging Face - Blog](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [AI, ML & Data Engineering](<https://devfeed.tech/topics/ai-ml-data-engineering.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [jobs](<https://devfeed.tech/topics/jobs.md>)

Tags: [cpu](<https://devfeed.tech/tags/cpu.md>), [cuda](<https://devfeed.tech/tags/cuda.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [jobs](<https://devfeed.tech/tags/jobs.md>), [kernels](<https://devfeed.tech/tags/kernels.md>), [liger](<https://devfeed.tech/tags/liger.md>), [mlp](<https://devfeed.tech/tags/mlp.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [profile](<https://devfeed.tech/tags/profile.md>), [pytorch](<https://devfeed.tech/tags/pytorch.md>), [torch](<https://devfeed.tech/tags/torch.md>), [traces](<https://devfeed.tech/tags/traces.md>)

## AI overview

A PyTorch profiling tutorial that moves from nn.Linear to a fused multilayer perceptron, explaining GPU kernels, CPU launch overhead, and tensor-transpose behavior in profiler traces.

## Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.