Skip to content

Commit 89d124a

Browse files
Raymo111facebook-github-bot
authored andcommitted
Document dynamo (#146736)
Summary: Many files in dynamo are currently lacking file/module-level documentation, which makes it hard to know what they do at a glance and without digging into the code. This fixes that. Note: documentation was AI-generated and could be incorrect, please review carefully. X-link: pytorch/pytorch#146736 Approved by: https://github.com/jansel, https://github.com/StrongerXi, https://github.com/anijain2305, https://github.com/zou3519 Reviewed By: huydhn Differential Revision: D69565828 fbshipit-source-id: 093b4575224b914a263f3e8e8994a63015a5b66d
1 parent ac67137 commit 89d124a

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/testing.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""Testing utilities and infrastructure for Dynamo.
2+
3+
This module provides a comprehensive set of testing utilities including:
4+
- Test result collection and validation
5+
- Graph manipulation and comparison tools
6+
- Test case management and execution helpers
7+
- Specialized test decorators for different Python versions and features
8+
- RNG state management
9+
- Compilation counting and monitoring
10+
- Debug utilities for bytecode transformation
11+
12+
The utilities in this module are used across Dynamo's test suite to ensure
13+
consistent testing patterns and proper test isolation.
14+
"""
15+
116
import contextlib
217
import dis
318
import functools

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
# mypy: allow-untyped-defs
2+
3+
"""
4+
Utility functions and classes used throughout the TorchDynamo system.
5+
6+
This module contains a collection of helper utilities used by various parts of Dynamo for:
7+
- Performance metrics collection and reporting
8+
- Compilation timing and debugging
9+
- Graph manipulation and tensor operations
10+
- Runtime guards and checks
11+
- Common data structure operations
12+
- Testing and development tools
13+
14+
This is an internal module that provides shared functionality used across the Dynamo codebase.
15+
"""
16+
217
from __future__ import annotations
318

419
import atexit

0 commit comments

Comments
 (0)