Skip to content

Conversation

@MGAMZ
Copy link

@MGAMZ MGAMZ commented Nov 1, 2025

This is a sub-PR of open-mmlab#1665

Motivation

The torch.compile receives a lot args. And in mmengine, all contents in compile from any config file will be transferred to torch.compile.
The mmengine checks several dependencies when user specifies compile in their config file, and making hasattr(config, compile) as the flag of enabling torch.compile.
However this is not exact. The compile config can include an arg disable to state if the compiler is actually working. So the mmengine needs to carefully determine if the user is actually enabling the torch.compile. This caused a small modification in mmengine/_strategy/base.py

Modification

When user specified compile with a dict type, the compile_model func will check if disable is set to True, and can directly return the model just like compile is set to None

Copilot AI review requested due to automatic review settings November 1, 2025 07:29
@read-the-docs-community
Copy link

Documentation build overview

📚 onedl-mmengine | 🛠️ Build #30160452 | 📁 Comparing d93517e against latest (a7f271e)


🔍 Preview build

Show files changed (5 files in total): 📝 5 modified | ➕ 0 added | ➖ 0 deleted
File Status
advanced_tutorials/data_transform.html 📝 modified
advanced_tutorials/test_time_augmentation.html 📝 modified
migration/transform.html 📝 modified
api/generated/mmengine.model.BaseTTAModel.html 📝 modified
_modules/mmengine/_strategy/base.html 📝 modified

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@lauriebax lauriebax merged commit e529128 into VBTI-development:main Nov 1, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants