Skip to content
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

Fix building on Windows with presence of Triton #6749

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion deepspeed/ops/transformer/inference/triton/matmul_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
# -----------------------------------------------------------------------------
# util class/functions for triton
def is_nfs_path(path):
if os.name == 'nt':
return False

# Normalize the path to get the absolute path
path = os.path.abspath(path)

Expand Down Expand Up @@ -99,7 +102,7 @@ def put(self, table):
with FileLock(self.lock_path):
with open(self.file_path + ".tmp", 'wb') as handle:
pickle.dump(table, handle)
os.rename(self.file_path + ".tmp", self.file_path)
os.replace(self.file_path + ".tmp", self.file_path)

def load(self):
if os.path.exists(self.file_path):
Expand Down