Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Added
double-conversion library to torchtext (#906)
* Adding function for reading vectors file in cpp * Updated delimiter to use ascii * Updating bugs in cpp * Final cpp implementation * Created multithreaded cpp load vectors * Fixing build errors * Fixing style check * Resolving PR comments * Running becnhmarks * Updated cpp func to use torch::cat * Using single vector of floats * Updating reserve tokens * Updating reserve tokens * Intermediate implementation with timing benchmark * Cleaned up comments and timers * Resolving PR comments * Readding timings and benchmarking * Added double conversion library, line seek, and ptr to Tensor impl * Removed timing code and uncommented benchmark * Uncommented Glove torch save * Commented out view caching * Added double-conversion library * Removed submodule double-conversion * Using at::launch for multithreading. Fixed bug with torch.saving cpp vectors object * Added double conversion to vectors * Resolving PR comments * Added a check for processed char count * fixing lint * lint
- Loading branch information
Showing
with
23 additions
and 3 deletions.
- +4 −0 .gitmodules
- +2 −1 build_tools/setup_helpers/extension.py
- +2 −1 third_party/CMakeLists.txt
- +1 −0 third_party/double-conversion
- +14 −1 torchtext/csrc/vectors.cpp
There are no files selected for viewing
This file contains 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
This file contains 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
| @@ -79,7 +79,8 @@ def _get_libraries(): | ||
| return [ | ||
| 'sentencepiece_train', | ||
| 'sentencepiece', | ||
| 're2', | ||
| 'double-conversion' | ||
| ] | ||
|
|
||
|
|
||
This file contains 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
| @@ -8,4 +8,5 @@ endif() | ||
| project(thirdparty CXX) | ||
| set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") | ||
|
|
||
| add_subdirectory(re2) | ||
| add_subdirectory(double-conversion) | ||
Submodule double-conversion
added at
b1d531
This file contains 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

