From 842099f2b084e58040963310000f5402d97250ae Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sat, 14 Feb 2026 04:13:25 -0800 Subject: [PATCH] Wrap models import with ROCm amdgpu ids fd2 filter (#4057) Co-authored-by: Daniel Hanchen --- unsloth/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unsloth/__init__.py b/unsloth/__init__.py index e3ced412a5..5587aa8c8e 100644 --- a/unsloth/__init__.py +++ b/unsloth/__init__.py @@ -305,8 +305,10 @@ elif DEVICE_TYPE == "xpu": # TODO: check triton for intel installed properly. pass -from .models import * -from .models import __version__ +# Filter native fd=2 amdgpu.ids noise during model import startup. +with _filter_rocm_amdgpu_ids_fd2_noise(): + from .models import * + from .models import __version__ from .save import * from .chat_templates import * from .tokenizer_utils import *