Skip to content

Conversation

@SabYic
Copy link
Collaborator

@SabYic SabYic commented Feb 3, 2026

No description provided.

@SabYic SabYic requested a review from Galaxy1458 as a code owner February 3, 2026 09:43
@SabYic SabYic changed the title [Build] Add FlagtreeConfig Class [Build] Add FlagtreeConfig Class for triton_v3.4.x Feb 3, 2026
Comment on lines 3 to 4
default_backends_list = list(default_backends)
default_backends_list.append('flir')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Replace it by

Suggested change
default_backends_list = list(default_backends)
default_backends_list.append('flir')
default_backends_list = [*default_backends, "flir"]

Would this be more readable?

default_backends_list.append('flir')
kargs["default_backends"] = tuple(default_backends_list)
default_backends = tuple(default_backends_list)
return default_backends No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

Append an "\n" to the file end.

Comment on lines 44 to 49
object.__setattr__(
self,
"flagtree_submodule_dir",
os.path.join(self.flagtree_root_dir, "third_party"),
)
object.__setattr__(self, "activated_module", self._activate_device_module(self.flagtree_backend))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why cannot we set attribute directly here?

object.__setattr__(self, "activated_module", self._activate_device_module(self.flagtree_backend))

def _activate_device_module(self, backend, suffix=".py"):
backend = "default" if not backend else backend
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
backend = "default" if not backend else backend
backend = backend or "default"

module = importlib.util.module_from_spec(spec)
try:
spec.loader.exec_module(module)
except Exception:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't "except Exception" here directly. That would make us lose other unexpected errors. Check the possible exception types here and assign specific ones.

@SabYic SabYic force-pushed the triton_v3.4.x_swj branch from d1390e6 to c85124c Compare February 5, 2026 06:53
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