Clean up transducer build#1159
Merged
mthrok merged 2 commits intopytorch:masterfrom Jan 9, 2021
Merged
Conversation
mthrok
commented
Jan 7, 2021
|
|
||
| PROJECT(rnnt_release) | ||
|
|
||
| SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") |
Contributor
Author
There was a problem hiding this comment.
Removing this as I do not see this reflected in build logs. -O3 is used.
mthrok
commented
Jan 7, 2021
|
|
||
| INCLUDE_DIRECTORIES(submodule/include) | ||
|
|
||
| SET(CMAKE_POSITION_INDEPENDENT_CODE ON) |
Contributor
Author
There was a problem hiding this comment.
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
mthrok
commented
Jan 7, 2021
| ) | ||
| command = ['cmake', '--build', '.'] | ||
| if _BUILD_TRANSDUCER: | ||
| command += ['--target', 'install'] |
Contributor
Author
There was a problem hiding this comment.
instrall target is only defined when building transducer.
vincentqb
approved these changes
Jan 8, 2021
Comment on lines
+20
to
+21
| target_include_directories(warprnnt PUBLIC submodule/include) | ||
| set_target_properties(warprnnt PROPERTIES PUBLIC_HEADER submodule/include/rnnt.h) |
Contributor
There was a problem hiding this comment.
nit: the commands are capitablized in this file :)
Suggested change
| 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) |
Contributor
Author
There was a problem hiding this comment.
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) { |
Contributor
There was a problem hiding this comment.
TORCH_LIBRARY_FRAGMENT is neat :)
Co-authored-by: Vincent QB <vincentqb@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR cleans up build process by
TORCH_LIBRARY_FRAGMENTmacro.libwarprnnt.afrom the build directory use the install directory, where other libsox related libraries are found.When
BUILD_TRANSDUCERis false-y valueRemaining tweak for build (not in this PR)
third_directoryClean up libsox build and directory location #1161