Remove TMP_LIBKINETO_NANOSECOND flag from Compilation (#124734)

Summary: Now that we have reached nanosecond granularity, we can now remove the temporary guards that were previously required for nanosecond precision.

Test Plan: Regression should cover this change

Reviewed By: aaronenyeshi

Differential Revision: D56444570

Pull Request resolved: https://github.com/pytorch/pytorch/pull/124734
Approved by: https://github.com/aaronenyeshi
This commit is contained in:
Shivam Raikundalia 2024-04-26 06:57:03 +00:00 committed by PyTorch MergeBot
parent 4ad291d07f
commit 63d4dc5a80
3 changed files with 2 additions and 5 deletions

View file

@ -1720,7 +1720,6 @@ def define_buck_targets(
compiler_flags = get_pt_compiler_flags() + ["-Wno-error"],
exported_preprocessor_flags = get_pt_preprocessor_flags() + [
"-DUSE_KINETO",
"-DTMP_LIBKINETO_NANOSECOND",
# Need this otherwise USE_KINETO is undefed
# for mobile
"-DEDGE_PROFILER_USE_KINETO",
@ -1747,7 +1746,6 @@ def define_buck_targets(
compiler_flags = get_pt_compiler_flags() + ["-Wno-error"],
exported_preprocessor_flags = get_pt_preprocessor_flags() + [
"-DUSE_KINETO",
"-DTMP_LIBKINETO_NANOSECOND",
"-DEDGE_PROFILER_USE_KINETO",
],
# @lint-ignore BUCKLINT link_whole
@ -1834,7 +1832,6 @@ def define_buck_targets(
compiler_flags = get_pt_compiler_flags() + ["-Wno-error"],
exported_preprocessor_flags = get_pt_preprocessor_flags() + [
"-DUSE_KINETO",
"-DTMP_LIBKINETO_NANOSECOND",
# Need this otherwise USE_KINETO is undefed
# for mobile
"-DEDGE_PROFILER_USE_KINETO",

View file

@ -1990,7 +1990,7 @@ if(USE_KINETO)
set_property(TARGET kineto PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
list(APPEND Caffe2_DEPENDENCY_LIBS kineto)
string(APPEND CMAKE_CXX_FLAGS " -DUSE_KINETO" " -DTMP_LIBKINETO_NANOSECOND")
string(APPEND CMAKE_CXX_FLAGS " -DUSE_KINETO")
if(LIBKINETO_NOCUPTI)
string(APPEND CMAKE_CXX_FLAGS " -DLIBKINETO_NOCUPTI")
endif()

View file

@ -27,7 +27,7 @@ add_library(backend_with_compiler SHARED
)
if(USE_KINETO)
set_target_properties(backend_with_compiler PROPERTIES COMPILE_FLAGS
"-DUSE_KINETO -DTMP_LIBKINETO_NANOSECOND")
"-DUSE_KINETO")
endif()
target_link_libraries(backend_with_compiler torch)