Skip to content

Commit

Permalink
fix cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
atalman committed Jun 14, 2023
1 parent 068f545 commit 76e4188
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/smoke_test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package_type = os.getenv("MATRIX_PACKAGE_TYPE")

is_cuda_system = gpu_arch_type == "cuda"
SCRIPT_DIR = Path(__file__).parent
NIGHTLY_ALLOWED_DELTA = 3

MODULES = [
Expand Down Expand Up @@ -206,10 +205,11 @@ def foo(x: torch.Tensor) -> torch.Tensor:
x_pt2 = torch.compile(model, mode="max-autotune")(x)

def smoke_test_modules():
cwd = os.getcwd()
for module in MODULES:
if module["repo"]:
if not os.path.exists(f"{SCRIPT_DIR}/{module['repo_name']}"):
print(f"Path does not exist: {SCRIPT_DIR}/{module['repo_name']}")
if not os.path.exists(f"{cwd}/{module['repo_name']}"):
print(f"Path does not exist: {cwd}/{module['repo_name']}")
subprocess.check_output(f"git clone --depth 1 {module['repo']}", stderr=subprocess.STDOUT, shell=True)
try:
output = subprocess.check_output(
Expand Down

0 comments on commit 76e4188

Please sign in to comment.