Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/test_triton_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def test_triton_placeholder_language():
assert lang.constexpr is None
assert lang.dtype is None
assert lang.int64 is None
assert lang.int32 is None
assert lang.tensor is None


def test_triton_placeholder_language_from_parent():
Expand Down
1 change: 1 addition & 0 deletions vllm/triton_utils/importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ def __init__(self):
self.dtype = None
self.int64 = None
self.int32 = None
self.tensor = None
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This change correctly adds the tensor attribute. To prevent future regressions, please also update the corresponding unit test in tests/test_triton_utils.py.

The test_triton_placeholder_language function is incomplete and should be updated to check for all attributes of TritonLanguagePlaceholder, including the newly added tensor.

Here is a suggested update for the test:

def test_triton_placeholder_language():
    lang = TritonLanguagePlaceholder()
    assert isinstance(lang, types.ModuleType)
    assert lang.__name__ == "triton.language"
    assert lang.constexpr is None
    assert lang.dtype is None
    assert lang.int64 is None
    assert lang.int32 is None
    assert lang.tensor is None

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added both int32 and tensor attribute