Skip to content
Merged
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
4 changes: 3 additions & 1 deletion test/test_mps.py
Original file line number Diff line number Diff line change
Expand Up @@ -9670,7 +9670,9 @@ class TestConsistency(TestCase):
"true_divide"
}

Copy link

@ssaladis ssaladis Jan 20, 2023

Choose a reason for hiding this comment

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

Was there an issue with the previous code for the path to the file ?

Copy link
Collaborator Author

@DenisVieriu97 DenisVieriu97 Jan 20, 2023

Choose a reason for hiding this comment

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

Yes, invoking test_mps.py directly from any other folder than pytorch's main folder would not work since the path was set to be relative to the main folder: ./test/cuda_results.yaml.
E.g invoking it directly from pytorch/test/ using python3 test_mps.py wouldn't work (FileNotFoundError: [Errno 2] No such file or directory: './test/cuda_results.yaml').

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks good, thanks Denis, this will resolve recent failures from OATS.

with open("./test/cuda_results.yaml") as f:
dirname = os.path.dirname(__file__)
filename = os.path.join(dirname, "cuda_results.yaml")
with open(filename) as f:
data = yaml.safe_load(f)
CUDA_RESULT = dict()
for key,value in data.items():
Expand Down