Skip to content

Commit

Permalink
Fix issues with the AIBench bisector
Browse files Browse the repository at this point in the history
Summary:
Test the `inductor_speedup` running with the regression yaml.
Do not import FBCODE_URL in the OSS environment.

Reviewed By: aaronenyeshi

Differential Revision: D51852602

fbshipit-source-id: c3874e7f484c65afb50ab310d4b5921542c89087
  • Loading branch information
xuzhao9 authored and facebook-github-bot committed Dec 5, 2023
1 parent 7de2aed commit 3795b8b
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions bisection.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,6 @@
TorchBenchABTestResult,
)

try:
# OSS utils
from regression_detector import generate_regression_result
from utils import gitutils
from utils.build_utils import (
build_repo,
cleanup_torch_packages,
setup_bisection_build_env,
TorchRepo,
)
from utils.cuda_utils import DEFAULT_CUDA_VERSION, prepare_cuda_env
IS_FBCODE = False
except (ImportError, ModuleNotFoundError):
# Meta-Internal imports
from .regression_detector import generate_regression_result
from .utils.build_utils import setup_bisection_build_env, TorchRepo
from .utils.cuda_utils import DEFAULT_CUDA_VERSION, prepare_cuda_env
from .utils.fb import hgutils
from .utils.fb.build_utils import setup_fbcode_repo, get_fbcode_build_artifact_dir, \
build_fbcode_repo, FBCODE_URL, FBCODE_BUILD_COMMAND
IS_FBCODE = True

TORCHBENCH_BISECTION_TARGETS = {
"pytorch": {
"name": "pytorch",
Expand All @@ -72,12 +50,35 @@
"url": "https://github.com/pytorch/benchmark.git",
"build_command": [sys.executable, "install.py"],
},
"fbcode": {
}

try:
# OSS utils
from regression_detector import generate_regression_result
from utils import gitutils
from utils.build_utils import (
build_repo,
cleanup_torch_packages,
setup_bisection_build_env,
TorchRepo,
)
from utils.cuda_utils import DEFAULT_CUDA_VERSION, prepare_cuda_env
IS_FBCODE = False
except (ImportError, ModuleNotFoundError):
# Meta-Internal imports
from .regression_detector import generate_regression_result
from .utils.build_utils import setup_bisection_build_env, TorchRepo
from .utils.cuda_utils import DEFAULT_CUDA_VERSION, prepare_cuda_env
from .utils.fb import hgutils
from .utils.fb.build_utils import setup_fbcode_repo, get_fbcode_build_artifact_dir, \
build_fbcode_repo, FBCODE_URL, FBCODE_BUILD_COMMAND
IS_FBCODE = True
TORCHBENCH_BISECTION_TARGETS["fbcode"] = {
"name": "fbcode",
"url": FBCODE_URL,
"build_command": FBCODE_BUILD_COMMAND,
}
}

SKIP_INSTALL_TORCHBENCH = False

def exist_dir_path(string):
Expand Down

0 comments on commit 3795b8b

Please sign in to comment.