add a test case for const fold (#65224)
authorShiyan Deng <dsy842974287@fb.com>
Fri, 17 Sep 2021 17:24:11 +0000 (10:24 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 17 Sep 2021 17:32:07 +0000 (10:32 -0700)
commitf9c0a39ad9320795fc8df77b570c317e0c2ab60e
tree8f8335f0413cfb88908ebe4c513fb57dbdeb2cd8
parent3c003aa6aee742caa48d5d0ac9499a58f38fd07b
add a test case for const fold (#65224)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65224

Add a test case for the fix D30996277 (https://github.com/pytorch/pytorch/commit/8c38d141df429459ea6891847950ce157ac82b2c).

Test Plan: buck test mode/opt -c python.package_style=inplace -c fbcode.nvcc_arch=v100,a100 -c fbcode.enable_gpu_sections=true -j 40 caffe2/test:fx_const_fold -- test_const_fold_module_attr

Reviewed By: jfix71

Differential Revision: D31000386

fbshipit-source-id: f444361839decc583bf93ac946cfe2049376719e
test/fx/test_fx_const_fold.py
torch/fx/experimental/const_fold.py