Torch-FL

Torch-FL#

Torch-FL (torch_fl) is a PyTorch device plugin for the FlagOS software stack. It exposes a single flagos device that routes operators among reusable native kernels, portable compiler kernels, vendor-native implementations, and explicit CPU fallback, so the same PyTorch program runs across accelerators without workload changes.

Torch-FL architecture

Overview

What Torch-FL is, its design principles, capabilities, and component architecture.

Torch-FL Overview
Getting Started

Platform selection, build requirements, environment setup, verification, and test markers.

Installation
Distributed

ProcessGroupFlagOS, FlagCX, vendor fallbacks, DDP and DataParallel support.

Distributed Collectives
Profiler

torch.profiler integration, vendor tracers, correlation ids, and parity with torch.cuda.

Profiler Integration
torch.compile

Inductor integration for the flagos device, FlagTree compilation, and platform notes.

torch.compile Integration
Reference

Per-platform capability validation, environment variables, and operation-routing configuration.

Compatibility and Platform Support