Skip to content

Commit

Permalink
Update on "Make CI error on inductor fallback when decomp is available"
Browse files Browse the repository at this point in the history
Fixes #99446 

Remove the warning, as that annoyed end-users who don't know what to do about it.

Instead, try to hold the line by preventing any decomp from being added without making
the corresponding change to inductor's fallbacks.

Note: we probably still need to better document how to update inductor's decomps,
for now it's pretty much "go ask the inductor team for advice"

cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire

[ghstack-poisoned]
  • Loading branch information
wconstab committed Apr 19, 2023
2 parents ce205d2 + 7caf285 commit 5ef5711
Show file tree
Hide file tree
Showing 119 changed files with 3,426 additions and 1,644 deletions.
3 changes: 3 additions & 0 deletions .github/scripts/generate_binary_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def generate_wheels_matrix(
os: str,
arches: Optional[List[str]] = None,
python_versions: Optional[List[str]] = None,
gen_special_an_non_special_wheel: bool = True,
) -> List[Dict[str, str]]:
package_type = "wheel"
if os == "linux":
Expand Down Expand Up @@ -249,6 +250,8 @@ def generate_wheels_matrix(
),
}
)
if not gen_special_an_non_special_wheel:
continue

ret.append(
{
Expand Down
13 changes: 4 additions & 9 deletions .github/scripts/generate_ci_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,10 @@ class OperatingSystem:
os=OperatingSystem.LINUX,
package_type="manywheel",
build_configs=generate_binary_build_matrix.generate_wheels_matrix(
OperatingSystem.LINUX, arches=["11.8"], python_versions=["3.8"]
),
branches="main",
),
BinaryBuildWorkflow(
os=OperatingSystem.LINUX,
package_type="manywheel",
build_configs=generate_binary_build_matrix.generate_wheels_matrix(
OperatingSystem.LINUX, arches=["11.7"], python_versions=["3.8"]
OperatingSystem.LINUX,
arches=["11.7", "12.1"],
python_versions=["3.8"],
gen_special_an_non_special_wheel=False,
),
branches="main",
),
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/generated-linux-binary-manywheel-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .lintrunner.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
merge_base_with = "origin/master"
merge_base_with = "origin/main"

[[linter]]
code = 'FLAKE8'
Expand Down Expand Up @@ -174,6 +174,8 @@ include_patterns = [
'torch/_dynamo/optimizations/__init__.py',
'torch/_dynamo/optimizations/backends.py',
'torch/_dynamo/optimizations/training.py',
'torch/_dynamo/debug_utils.py',
'torch/_dynamo/repro/**/*.py',
'torch/_inductor/graph.py',
'torch/_C/_dynamo/**/*.py',
'test/test_utils.py', # used to by in MYPY but after importing op_db it took 10+ minutes
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ pip install -r requirements.txt
conda install mkl mkl-include
# CUDA only: Add LAPACK support for the GPU if needed
conda install -c pytorch magma-cuda110 # or the magma-cuda* that matches your CUDA version from https://anaconda.org/pytorch/repo

# (optional) If using torch.compile with inductor/triton, install the matching version of triton
# Run from the pytorch directory after cloning
make triton
```

**On MacOS**
Expand Down
15 changes: 0 additions & 15 deletions aten/src/ATen/CPUGeneratorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,6 @@ void CPUGeneratorImpl::set_current_seed(uint64_t seed) {
engine_ = mt19937(seed);
}

/**
* Sets the offset of RNG state.
* See Note [Acquire lock when using random generators]
*/
void CPUGeneratorImpl::set_offset(uint64_t offset) {
TORCH_CHECK(false, "CPU Generator does not use offset");
}

/**
* Gets the current offset of CPUGeneratorImpl.
*/
uint64_t CPUGeneratorImpl::get_offset() const {
TORCH_CHECK(false, "CPU Generator does not use offset");
}

/**
* Gets the current seed of CPUGeneratorImpl.
*/
Expand Down
2 changes: 0 additions & 2 deletions aten/src/ATen/CPUGeneratorImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ struct TORCH_API CPUGeneratorImpl : public c10::GeneratorImpl {
// CPUGeneratorImpl methods
std::shared_ptr<CPUGeneratorImpl> clone() const;
void set_current_seed(uint64_t seed) override;
void set_offset(uint64_t offset) override;
uint64_t get_offset() const override;
uint64_t current_seed() const override;
uint64_t seed() override;
void set_state(const c10::TensorImpl& new_state) override;
Expand Down

0 comments on commit 5ef5711

Please sign in to comment.