-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up transducer build #1159
Conversation
|
||
PROJECT(rnnt_release) | ||
|
||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this as I do not see this reflected in build logs. -O3
is used.
|
||
INCLUDE_DIRECTORIES(submodule/include) | ||
|
||
SET(CMAKE_POSITION_INDEPENDENT_CODE ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PIC argument has to be consistent across all the libraries. The current configuration works without this explicit line, but I moved this to the top level CMakeLitst.txt
cwd=build_dir, | ||
check=True, | ||
) | ||
command = ['cmake', '--build', '.'] | ||
if _BUILD_TRANSDUCER: | ||
command += ['--target', 'install'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instrall
target is only defined when building transducer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
target_include_directories(warprnnt PUBLIC submodule/include) | ||
set_target_properties(warprnnt PROPERTIES PUBLIC_HEADER submodule/include/rnnt.h) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the commands are capitablized in this file :)
target_include_directories(warprnnt PUBLIC submodule/include) | |
set_target_properties(warprnnt PROPERTIES PUBLIC_HEADER submodule/include/rnnt.h) | |
TARGET_INCLUDE_DIRECTORIES(warprnnt PUBLIC submodule/include) | |
SET_TARGET_PROPERTIES(warprnnt PROPERTIES PUBLIC_HEADER submodule/include/rnnt.h) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intended. only ancient CMake should use all capitals. I could have lowercased others but I left them untouched.
} | ||
|
||
#endif | ||
TORCH_LIBRARY_FRAGMENT(torchaudio, m) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TORCH_LIBRARY_FRAGMENT
is neat :)
Co-authored-by: Vincent QB <[email protected]>
This PR cleans up build process by
TORCH_LIBRARY_FRAGMENT
macro.libwarprnnt.a
from the build directory use the install directory, where other libsox related libraries are found.When
BUILD_TRANSDUCER
is false-y valueRemaining tweak for build (not in this PR)
third_directory
Clean up libsox build and directory location #1161