Skip to content

Commit 67bba1e

Browse files
Copilotmawad-amd
andcommitted
Fix import path issue in test_gemm_all_scatter.py by adding repo root to sys.path
Co-authored-by: mawad-amd <112003944+mawad-amd@users.noreply.github.com>
1 parent 8b81716 commit 67bba1e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/examples/test_gemm_all_scatter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77
import iris
88

99
import importlib.util
10+
import sys
1011
from pathlib import Path
1112

1213
current_dir = Path(__file__).parent
1314

15+
# Add the repository root to Python path so relative imports work
16+
repo_root = current_dir.parent.parent
17+
if str(repo_root) not in sys.path:
18+
sys.path.insert(0, str(repo_root))
19+
1420
# Import the matmul wrapper
1521
matmul_path = (current_dir / "../../examples/07_gemm_all_scatter/matmul_wrapper.py").resolve()
1622
matmul_spec = importlib.util.spec_from_file_location("matmul_wrapper", matmul_path)

0 commit comments

Comments
 (0)