File tree Expand file tree Collapse file tree 5 files changed +31
-9
lines changed Expand file tree Collapse file tree 5 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 1
1
add_subdirectory (detail )
2
2
3
- cc_library (memory SRCS memory.cc DEPS place )
3
+ cc_library (memory SRCS memory.cc DEPS place enforce )
4
4
cc_library (memcpy SRCS memcpy.cc )
5
5
6
6
cc_library (paddle_memory
Original file line number Diff line number Diff line change 1
- cc_library (cpu_info SRCS cpu_info.cc DEPS gflags glog )
1
+ if (WITH_GPU )
2
+ cc_library (enforce SRCS enforce.cc DEPS nccl )
3
+ else ()
4
+ cc_library (enforce SRCS enforce.cc )
5
+ endif ()
6
+ cc_test (enforce_test SRCS enforce_test.cc DEPS stringpiece enforce )
7
+
8
+ cc_library (cpu_info SRCS cpu_info.cc DEPS gflags glog enforce )
2
9
cc_test (cpu_info_test SRCS cpu_info_test.cc DEPS cpu_info )
3
10
4
- nv_library (gpu_info SRCS gpu_info.cc DEPS gflags glog )
11
+ nv_library (gpu_info SRCS gpu_info.cc DEPS gflags glog enforce )
5
12
6
- cc_library (place SRCS place.cc )
13
+ cc_library (place SRCS place.cc DEPS enforce )
7
14
cc_test (place_test SRCS place_test.cc DEPS place glog gflags )
8
15
9
16
add_subdirectory (dynload )
10
17
11
- cc_test (enforce_test SRCS enforce_test.cc DEPS stringpiece )
12
-
13
18
IF (WITH_GPU )
14
19
set (GPU_CTX_DEPS dynload_cuda dynamic_loader )
15
20
ELSE ()
Original file line number Diff line number Diff line change 1
- cc_library (dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags )
1
+ cc_library (dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags enforce )
2
2
nv_library (dynload_cuda SRCS cublas.cc cudnn.cc curand.cc nccl.cc
3
3
DEPS dynamic_loader nccl )
Original file line number Diff line number Diff line change
1
+ /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License. */
14
+
15
+ #include " paddle/platform/enforce.h"
16
+
17
+ namespace paddle {
18
+ namespace platform {} // namespace platform
19
+ } // namespace paddle
Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ limitations under the License. */
49
49
namespace paddle {
50
50
namespace platform {
51
51
52
- namespace {
53
52
#ifdef __GNUC__
54
53
inline std::string demangle (std::string name) {
55
54
int status = -4 ; // some arbitrary value to eliminate the compiler warning
@@ -60,7 +59,6 @@ inline std::string demangle(std::string name) {
60
59
#else
61
60
inline std::string demangle (std::string name) { return name; }
62
61
#endif
63
- }
64
62
65
63
struct EnforceNotMet : public std ::exception {
66
64
std::exception_ptr exp_;
You can’t perform that action at this time.
0 commit comments