[Build] Add FlagtreeConfig Class for triton_v3.4.x#342
Open
SabYic wants to merge 11 commits intotriton_v3.4.xfrom
Open
[Build] Add FlagtreeConfig Class for triton_v3.4.x#342SabYic wants to merge 11 commits intotriton_v3.4.xfrom
SabYic wants to merge 11 commits intotriton_v3.4.xfrom
Conversation
sgjzfzzf
reviewed
Feb 4, 2026
python/setup_tools/utils/aipu.py
Outdated
Comment on lines
3
to
4
| default_backends_list = list(default_backends) | ||
| default_backends_list.append('flir') |
Collaborator
There was a problem hiding this comment.
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?
python/setup_tools/utils/aipu.py
Outdated
| 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 |
Collaborator
There was a problem hiding this comment.
Append an "\n" to the file end.
python/setup_tools/utils/tools.py
Outdated
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)) |
Collaborator
There was a problem hiding this comment.
Why cannot we set attribute directly here?
python/setup_tools/utils/tools.py
Outdated
| 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 |
Collaborator
There was a problem hiding this comment.
Suggested change
| backend = "default" if not backend else backend | |
| backend = backend or "default" |
python/setup_tools/utils/tools.py
Outdated
| module = importlib.util.module_from_spec(spec) | ||
| try: | ||
| spec.loader.exec_module(module) | ||
| except Exception: |
Collaborator
There was a problem hiding this comment.
Don't "except Exception" here directly. That would make us lose other unexpected errors. Check the possible exception types here and assign specific ones.
d1390e6 to
c85124c
Compare
modified: python/setup_tools/utils/tools.py
modified: python/setup_tools/utils/tools.py
Refactor _activate_device_module to set backend internally
modified: python/setup_tools/utils/tools.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.