Commit Graph

4 Commits

Author SHA1 Message Date
jjsjann123 0e582fbfcc [NVFuser] Upstream push 0907 (#84626)
Syncing nvfuser devel branch to upstream master. https://github.com/csarofeen/pytorch/

Codegen changes include:

- codegen improvement:
i. improved view support on pointwise and transpose scheduler
ii. grouped grid welford added for better outer-norm grid persistence in normalization

- misc:
i. new composite ops added: variance_mean , arange,
ii. fixes misaligned address for transpose scheduler
iii. refactor on separation of compilation API from execution API to prepare us for async compilation
iv. double type support on expression evaluator
v. PYTORCH_NVFUSER_DUMP refactor to save PTX and CUBIN

Commits that's in this PR from the devel branch:
```
89330aa23a Tensor factories must set the output shape as its input (#1939)
b2fd01ea93 arange support (#1933)
56c00fd392 Double support on all expression evaluators (#1937)
371f28223e Improve trivial reduction merge support (#1931)
1d0c26790e Test `rand` in a fusion with zero tensor input (#1932)
0dab160fb2 Fix softmax bwd sizes. (#1890)
ef98f360f6 Fix a bug (#1936)
63132a0c56 Propagate permissive mapping information into indexing pass (#1929)
b4ac2c88d7 Map IterationDomains through view operations. (#1919)
c0a187a761 do not use deprecated functions (#1935)
88de85e758 Upstream cherry pick fixes 0811 (#1934)
b247dcf7c5 Separate kernel compilation API from kernel execution API (#1914)
b34e3b93ee Fix `ir_utils::hasBlockSync` + misc fixes in transpose scheduler (#1924)
14a53e6707 Nullary RNGOp (#1892)
3c3c89e638 Misc fixes/tuning for transpose scheduler (#1912)
20cf109c8b Grouped grid welford (#1921)
6cf7eb024c Transpose scheduler small dim sizes better support (#1910)
9341ea9a5b Disabled ViewPersistentShmoo sizes that results in NAN (#1922)
057237f66d Fix CUDA driver error: misaligned address for transpose scheduler  (#1918)
3fb3d80339 Add variance_mean function using Welford (#1907)
98febf6aa3 Remove DisableOption::UnrollWithRng (#1913)
ee8ef33a55 Minor fix for the debug interface of using PTX directly (#1917)
6e8f953351 Add PYTORCH_NVFUSER_DUMP options to save PTX and CUBIN (#1916)
5eefa9a723 dopt is only available since nvrtc 11.7 (#1915)
2ec8fc711e Kill computeAtBetween (#1911)
d0d106a1d9 Improve view support on pointwise and transpose scheduler (#1906)
e71e1ecefe Fix name clash of RNG with shared memory (#1904)
3381793a25 Fix mutator and sameAs for expanded IterDomain (#1902)
```

RUN_TORCHBENCH: nvfuser

Differential Revision: [D39324552](https://our.internmc.facebook.com/intern/diff/D39324552)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/84626
Approved by: https://github.com/malfet
2022-09-23 20:29:48 +00:00
jjsjann123 a2802ad0b9 Upstream master bump 0513 (#77471)
Updating nvfuser code base.

This should fix the indexing issue observed in https://github.com/pytorch/vision/issues/6015.

Running tests locally as well. Will update the description here at a later point

@bypass-github-export-checks
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77471
Approved by: https://github.com/seemethere, https://github.com/eellison
2022-05-18 11:48:50 -07:00
jiej 2d110d514f Nvfuser code bump 2_1_2022 (#72127)
Summary:
Things changed in this PR that requires review:
1. aten/src/ATen/core/interned_strings.h
2. torch/csrc/jit/ir/alias_analysis.h : exposing createValue to allow efficient mutation
3. torch/csrc/jit/runtime/symbolic_shape_registry.cpp : added gelu/tanh/erf in registry
4. torch/jit/_script.py : throws scripting model sees autocast as decorator since it's not supported

nvfuser code update:
1. codegen improvements and performance tuning
2. integration bug fixes for shape expression logic
3. kernel segmentation update to address perf regression from horizontal fusion
4. scalar cpu tensor promotion to support inter-device operation between cpu scalar tensor and cuda tensor

Things reverted from local changes:
aten::gelu with approximation (tracked in PR: https://github.com/pytorch/pytorch/pull/61439)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/72127

Reviewed By: HamidShojanazeri

Differential Revision: D34113233

Pulled By: jbschlosser

fbshipit-source-id: b82cde32b71e324eca0ea57cb8c9f9647278ca74
(cherry picked from commit e009bc5c4e)
2022-02-15 00:43:16 +00:00
jjsjann123 0dc3f829d9 Nvfuser code bump 11 5 (#67943)
Summary:
nvfuser code update:
1. Tuning heuristics on schedulers for reduction/normalization kernels;
2. bfloat16 on IO tensor support;
3. Refactored memory format support, now we can support dimension collapsing with non-coherent input tensors with different memory format. e.g. channels last tensor input to batch normalization. Note that we are currently limiting memory format to only Contiguous and Channels last;
4. Refactored nvfuser graph partitioning in `graph_fuser.cpp`, separated node merge and profile node API. Updated `profiling_record.cpp`.

Things that are reverted from our local branch:
1. changes on some entries in autodiff
2. aten::gelu with approximation
3. native_dropout(_backward)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/67943

Reviewed By: ngimel

Differential Revision: D32288709

Pulled By: dzhulgakov

fbshipit-source-id: fc9491182ea7e0158bc112c66f096823c588eaf1
2021-11-17 01:22:17 -08:00