Make it an error if calling sizes() on a dynamic tensor. (#4998)
* Err if calling sizes() on dynamic tensor
* try to set has_symbolic_sizes_strides_
* resolve merge conflict
* enable CONTINUE_ON_ERROR
* fixed the python test test_SizeEq_should_not_compile_for_identical_symints
* fix test_index_types
* set CONTINUE_ON_ERROR to true
* remove some unwanted code.
* add a print
* directly set has_symbolic_sizes_strides_ = true
* make some fixes.
* fix empty_strided_symint
* ran linter
* change error type in the test.
* fix comments
* ran linter