Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
3e7bd703
Unverified
Commit
3e7bd703
authored
Feb 04, 2020
by
Haichen Shen
Committed by
GitHub
Feb 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow customize mkldnn library location (#4814)
parent
f9b46c43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
cmake/config.cmake
+1
-1
cmake/modules/contrib/BLAS.cmake
+23
-5
No files found.
cmake/config.cmake
View file @
3e7bd703
...
...
@@ -132,7 +132,7 @@ set(USE_BLAS none)
# set(USE_MKL_PATH <path to venv or site-packages directory>) if using `pip install mkl`
set
(
USE_MKL_PATH none
)
# Whether use MKLDNN library
# Whether use MKLDNN library
, choices: ON, OFF, path to mkldnn library
set
(
USE_MKLDNN OFF
)
# Whether use OpenMP thread pool, choices: gnu, intel
...
...
cmake/modules/contrib/BLAS.cmake
View file @
3e7bd703
...
...
@@ -56,9 +56,27 @@ else()
message
(
FATAL_ERROR
"Invalid option: USE_BLAS="
${
USE_BLAS
}
)
endif
()
if
(
USE_MKLDNN STREQUAL
"ON"
)
find_library
(
BLAS_LIBRARY_MKLDNN dnnl
)
list
(
APPEND TVM_RUNTIME_LINKER_LIBS
${
BLAS_LIBRARY_MKLDNN
}
)
add_definitions
(
-DUSE_DNNL=1
)
message
(
STATUS
"Use MKLDNN library "
${
BLAS_LIBRARY_MKLDNN
}
)
if
(
IS_DIRECTORY
${
USE_MKLDNN
}
)
find_library
(
MKLDNN_LIBRARY NAMES dnnl HINTS
${
USE_MKLDNN
}
/lib/
)
if
(
MKLDNN_LIBRARY STREQUAL
"MKLDNN_LIBRARY-NOTFOUND"
)
message
(
WARNING
"Cannot find MKLDNN library at
${
USE_MKLDNN
}
."
)
else
()
include_directories
(
${
USE_MKLDNN
}
/include
)
list
(
APPEND TVM_RUNTIME_LINKER_LIBS
${
MKLDNN_LIBRARY
}
)
add_definitions
(
-DUSE_DNNL=1
)
message
(
STATUS
"Use MKLDNN library "
${
MKLDNN_LIBRARY
}
)
endif
()
elseif
(
USE_MKLDNN STREQUAL
"ON"
)
find_library
(
MKLDNN_LIBRARY dnnl
)
if
(
MKLDNN_LIBRARY STREQUAL
"MKLDNN_LIBRARY-NOTFOUND"
)
message
(
WARNING
"Cannot find MKLDNN library. Try to specify the path to MKLDNN library."
)
else
()
list
(
APPEND TVM_RUNTIME_LINKER_LIBS
${
MKLDNN_LIBRARY
}
)
add_definitions
(
-DUSE_DNNL=1
)
message
(
STATUS
"Use MKLDNN library "
${
MKLDNN_LIBRARY
}
)
endif
()
elseif
(
USE_MKLDNN STREQUAL
"OFF"
)
# pass
else
()
message
(
FATAL_ERROR
"Invalid option: USE_MKLDNN="
${
USE_MKLDNN
}
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment