Skip to content

Conversation

@anmyachev
Copy link
Contributor

Checking before upstreaming to Triton.

Copy link
Contributor

@pbchekin pbchekin left a comment

Choose a reason for hiding this comment

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

Looks good! One question below, plus:

  • Do you think it is reasonable to annotate tmp_path as tmp_path: pathlib.Path? Other arguments are not annotated, so it is a questionable change.
  • We can also upstream first small changes to Proton's start (and potentially other Triton functions) that accept a file name as str to accept os.PathLike which can be str or pathlib.Path. This will minimize changes in this PR: proton.start(str(temp_file)) will be proton.start(temp_file).

assert pathlib.Path(proton.DEFAULT_PROFILE_NAME + ".hatchet").exists()
default_file = pathlib.Path(proton.DEFAULT_PROFILE_NAME + ".hatchet")
assert default_file.exists()
default_file.unlink()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this unlink? The whole tmp_path should be deleted on exit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it seems yes, because default_file defined using the default name of the proton itself, which may not be in the temporary folder

@anmyachev
Copy link
Contributor Author

In the upstream: triton-lang/triton@a273986

@anmyachev anmyachev closed this Nov 2, 2024
@anmyachev anmyachev deleted the amyachev/tmp-path branch November 13, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants