FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
CaffeOnACL/src/caffe/test/test_platform.cpp at master · rootkit/CaffeOnACL · GitHub
rootkit
CaffeOnACL
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
CaffeOnACL
/
src
/
caffe
/
test
/
test_platform.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
57 lines (48 loc) · 2.11 KB
Breadcrumbs
CaffeOnACL
/
src
/
caffe
/
test
/
test_platform.cpp
Copy path
File metadata and controls
57 lines (48 loc) · 2.11 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
ifndef
CPU_ONLY
#
include
<
cstdio
>
#
include
<
cstdlib
>
#
include
"
glog/logging.h
"
#
include
"
gtest/gtest.h
"
#
include
"
caffe/test/test_caffe_main.hpp
"
namespace
caffe
{
extern
cudaDeviceProp
CAFFE_TEST_CUDA_PROP
;
class
PlatformTest
: public ::testing::Test {};
TEST_F
(PlatformTest, TestInitialization) {
printf
(
"
Major revision number: %d
\n
"
,
CAFFE_TEST_CUDA_PROP
.
major
);
printf
(
"
Minor revision number: %d
\n
"
,
CAFFE_TEST_CUDA_PROP
.
minor
);
printf
(
"
Name: %s
\n
"
,
CAFFE_TEST_CUDA_PROP
.
name
);
printf
(
"
Total global memory: %lu
\n
"
,
CAFFE_TEST_CUDA_PROP
.
totalGlobalMem
);
printf
(
"
Total shared memory per block: %lu
\n
"
,
CAFFE_TEST_CUDA_PROP
.
sharedMemPerBlock
);
printf
(
"
Total registers per block: %d
\n
"
,
CAFFE_TEST_CUDA_PROP
.
regsPerBlock
);
printf
(
"
Warp size: %d
\n
"
,
CAFFE_TEST_CUDA_PROP
.
warpSize
);
printf
(
"
Maximum memory pitch: %lu
\n
"
,
CAFFE_TEST_CUDA_PROP
.
memPitch
);
printf
(
"
Maximum threads per block: %d
\n
"
,
CAFFE_TEST_CUDA_PROP
.
maxThreadsPerBlock
);
for
(
int
i =
0
; i <
3
; ++i)
printf
(
"
Maximum dimension %d of block: %d
\n
"
, i,
CAFFE_TEST_CUDA_PROP
.
maxThreadsDim
[i]);
for
(
int
i =
0
; i <
3
; ++i)
printf
(
"
Maximum dimension %d of grid: %d
\n
"
, i,
CAFFE_TEST_CUDA_PROP
.
maxGridSize
[i]);
printf
(
"
Clock rate: %d
\n
"
,
CAFFE_TEST_CUDA_PROP
.
clockRate
);
printf
(
"
Total constant memory: %lu
\n
"
,
CAFFE_TEST_CUDA_PROP
.
totalConstMem
);
printf
(
"
Texture alignment: %lu
\n
"
,
CAFFE_TEST_CUDA_PROP
.
textureAlignment
);
printf
(
"
Concurrent copy and execution: %s
\n
"
,
(
CAFFE_TEST_CUDA_PROP
.
deviceOverlap
?
"
Yes
"
:
"
No
"
));
printf
(
"
Number of multiprocessors: %d
\n
"
,
CAFFE_TEST_CUDA_PROP
.
multiProcessorCount
);
printf
(
"
Kernel execution timeout: %s
\n
"
,
(
CAFFE_TEST_CUDA_PROP
.
kernelExecTimeoutEnabled
?
"
Yes
"
:
"
No
"
));
printf
(
"
Unified virtual addressing: %s
\n
"
,
(
CAFFE_TEST_CUDA_PROP
.
unifiedAddressing
?
"
Yes
"
:
"
No
"
));
EXPECT_TRUE
(
true
);
}
}
//
namespace caffe
#
endif
//
CPU_ONLY
Back
|
FazBrowse Home
|
New Git URL