提交 27a0d6c2 编写于 作者: M minqiyang

Polish code

test=develop
上级 728e7e88
...@@ -209,7 +209,6 @@ include(external/xxhash) # download xxhash ...@@ -209,7 +209,6 @@ include(external/xxhash) # download xxhash
include(external/dlpack) include(external/dlpack)
include(external/snappy) # download snappy include(external/snappy) # download snappy
include(external/snappystream) # download snappystream include(external/snappystream) # download snappystream
include(external/robin_map) # download tsl::robin_map
if (NOT WIN32) if (NOT WIN32)
# there is no official support of warpctc, nccl, cupti in windows # there is no official support of warpctc, nccl, cupti in windows
......
include(ExternalProject)
set(ROBIN_MAP_SOURCE_DIR ${THIRD_PARTY_PATH}/robin_map)
set(ROBIN_MAP_INCLUDE_DIR ${ROBIN_MAP_SOURCE_DIR}/src/extern_robin_map/include)
include_directories(${ROBIN_MAP_INCLUDE_DIR})
ExternalProject_Add(
extern_robin_map
${EXTERNAL_PROJECT_LOG_ARGS}
GIT_REPOSITORY "https://github.com/Tessil/robin-map.git"
GIT_TAG "v0.5.0"
PREFIX ${ROBIN_MAP_SOURCE_DIR}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
if(${CMAKE_VERSION} VERSION_LESS "3.3.0")
set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/robin_map_dummy.c)
file(WRITE ${dummyfile} "const char *dummy = \"${dummyfile}\";")
add_library(robin_map STATIC ${dummyfile})
else()
add_library(robin_map INTERFACE)
endif()
add_dependencies(robin_map extern_robin_map)
LIST(APPEND externl_project_dependencies robin_map)
...@@ -113,11 +113,6 @@ class Scope { ...@@ -113,11 +113,6 @@ class Scope {
mutable std::unordered_map<std::string, std::unique_ptr<Variable>, mutable std::unordered_map<std::string, std::unique_ptr<Variable>,
inner::KeyHasher> inner::KeyHasher>
vars_; vars_;
// mutable tsl::robin_map<
// std::string, std::unique_ptr<Variable>, std::hash<std::string>,
// std::equal_to<std::string>,
// std::allocator<std::pair<std::string, std::unique_ptr<Variable>>>, true>
// vars_;
private: private:
// Call Scope::NewScope for a sub-scope. // Call Scope::NewScope for a sub-scope.
......
...@@ -92,7 +92,6 @@ def cuda_profiler(output_file, output_mode=None, config=None): ...@@ -92,7 +92,6 @@ def cuda_profiler(output_file, output_mode=None, config=None):
config_file = 'nvprof_config_file' config_file = 'nvprof_config_file'
with open(config_file, 'wb') as fp: with open(config_file, 'wb') as fp:
fp.writelines([six.b("%s\n" % item) for item in config]) fp.writelines([six.b("%s\n" % item) for item in config])
#Comment this for nvprof
core.nvprof_init(output_file, output_mode, config_file) core.nvprof_init(output_file, output_mode, config_file)
# Enables profiler collection by the active CUDA profiling tool. # Enables profiler collection by the active CUDA profiling tool.
core.nvprof_start() core.nvprof_start()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册