mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[CMake] Remove forcing of -O2
from torch_compile_options
(#164894)
That was introduced by 75a65ffe0f
Hattip to @jathu for alerting me about the issue. As result, all our PyTorch builds were shipped with `-O2` for almost all of its modern history
Partially undo the damage introduced by https://github.com/pytorch/pytorch/pull/128406 that cause cross-ISA symbols leak, to be properly followed up in https://github.com/pytorch/pytorch/issues/165123
Pull Request resolved: https://github.com/pytorch/pytorch/pull/164894
Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
df514a6d5a
commit
9a3c4b917e
@ -406,7 +406,7 @@ scalar_t cubic_convolution2(scalar_t x, scalar_t A) {
|
||||
}
|
||||
|
||||
template <typename scalar_t>
|
||||
void get_cubic_upsample_coefficients(
|
||||
static inline void get_cubic_upsample_coefficients(
|
||||
scalar_t coeffs[4],
|
||||
scalar_t t) {
|
||||
scalar_t A = -0.75;
|
||||
|
@ -439,10 +439,6 @@ function(torch_compile_options libname)
|
||||
$<$<COMPILE_LANGUAGE:CXX>: -fvisibility=hidden>)
|
||||
endif()
|
||||
|
||||
# Use -O2 for release builds (-O3 doesn't improve perf, and -Os results in perf regression)
|
||||
target_compile_options(${libname} PRIVATE
|
||||
$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebInfo>>>:-O2>)
|
||||
|
||||
endfunction()
|
||||
|
||||
##############################################################################
|
||||
|
Reference in New Issue
Block a user