Skip to content

Resolve import conflicts with installed triton library by renaming op_tests.triton for modular imports #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 25, 2025

Conversation

AdrianAbeyta
Copy link
Contributor

Rename op_tests/triton/ --> op_tests/triton_tests/ to avoid conflicts with the installed Triton package.

Python's import system prioritizes local directories over site-packages, causing import triton.language to incorrectly resolve to the local op_tests/triton/ folder.

This change ensures imports correctly target the installed Triton library. No functional changes — only directory renaming and minor import path updates.

@okakarpa okakarpa requested a review from Copilot April 22, 2025 15:29
Copy link

@Copilot 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.

Pull Request Overview

This PR renames the local op_tests/triton directory to op_tests/triton_tests to avoid import conflicts with the installed Triton package. Key changes include:

  • Renaming the directory and updating import paths.
  • Adding init.py files with standardized licensing headers.
  • Ensuring that the op_tests/triton_tests/init.py imports are set to expose utility modules.

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

File Description
op_tests/triton_tests/utils/init.py Added licensing header and wildcard imports from utility modules.
op_tests/triton_tests/init.py Added licensing header and re-exported utils.
op_tests/init.py Added licensing header.

@AdrianAbeyta AdrianAbeyta requested a review from valarLip April 22, 2025 22:53
@valarLip
Copy link
Collaborator

still some issue caused triton ut failed
Uploading image.png…

@AdrianAbeyta
Copy link
Contributor Author

@valarLip updated imports in op_tests.triton_tests to use relative paths. Issue should be resolved now. Thanks for taking a look.

@valarLip valarLip merged commit 54c542c into main Apr 25, 2025
5 checks passed
@valarLip valarLip deleted the adabeyta/triton-utils branch April 25, 2025 05:31
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