Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
apex
Commits
4d567459
Commit
4d567459
authored
Aug 09, 2022
by
hubertlu-tw
Browse files
Remove run_pyprof_data and run_pyprof_nvtx unit tests
parent
ced59fcc
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
570 deletions
+0
-570
tests/L0/run_pyprof_data/__init__.py
tests/L0/run_pyprof_data/__init__.py
+0
-0
tests/L0/run_pyprof_data/test_pyprof_data.py
tests/L0/run_pyprof_data/test_pyprof_data.py
+0
-43
tests/L0/run_pyprof_nvtx/__init__.py
tests/L0/run_pyprof_nvtx/__init__.py
+0
-1
tests/L0/run_pyprof_nvtx/test_pyprof_nvtx.py
tests/L0/run_pyprof_nvtx/test_pyprof_nvtx.py
+0
-526
No files found.
tests/L0/run_pyprof_data/__init__.py
deleted
100644 → 0
View file @
ced59fcc
tests/L0/run_pyprof_data/test_pyprof_data.py
deleted
100644 → 0
View file @
ced59fcc
import
inspect
import
unittest
from
apex.pyprof.prof.data
import
Data
from
apex.pyprof.prof.prof
import
foo
class
TestPyProfData
(
unittest
.
TestCase
):
def
__init__
(
self
,
testName
):
super
().
__init__
(
testName
)
def
setUp
(
self
):
pass
def
tearDown
(
self
):
pass
def
test_data
(
self
):
kernels
=
[
{
'kShortName'
:
'elementwise_kernel'
,
'kDuration'
:
2848
,
'layer'
:
[],
'trace'
:
[],
'reprMarkers'
:
[],
'marker'
:
[
"{'mod': 'Tensor', 'op': 'float', 'args': [{'name': '', 'type': 'tensor', 'shape': (18, 104, 160), 'dtype': 'bool'}]}"
],
'seqMarker'
:
[
'to, seq = 60471'
],
'seqId'
:
[
60471
],
'subSeqId'
:
0
,
'altSeqId'
:
[],
'dir'
:
'fprop'
,
'mod'
:
[
'Tensor'
],
'op'
:
[
'float'
],
'tid'
:
1431533376
,
'device'
:
0
,
'stream'
:
7
,
'grid'
:
(
585
,
1
,
1
),
'block'
:
(
512
,
1
,
1
),
'kLongName'
:
'void at::native::elementwise_kernel<512, 1, void at::native::gpu_kernel_impl<void at::native::copy_kernel_impl<float, bool>(at::TensorIterator&)::{lambda(bool)#1}>(at::TensorIterator&, void at::native::copy_kernel_impl<float, bool>(at::TensorIterator&)::{lambda(bool)#1} const&)::{lambda(int)#1}>(int, void at::native::gpu_kernel_impl<void at::native::copy_kernel_impl<float, bool>(at::TensorIterator&)::{lambda(bool)#1}>(at::TensorIterator&, void at::native::copy_kernel_impl<float, bool>(at::TensorIterator&)::{lambda(bool)#1} const&)::{lambda(int)#1})'
},
{
'kShortName'
:
'elementwise_kernel'
,
'kDuration'
:
201182
,
'layer'
:
[],
'trace'
:
[],
'reprMarkers'
:
[],
'marker'
:
[
"{'mod': 'Tensor', 'op': 'clone', 'args': [{'name': '', 'type': 'tensor', 'shape': (18, 4, 416, 640), 'dtype': 'float32'}]}"
],
'seqMarker'
:
[
'clone, seq = 60161'
],
'seqId'
:
[
60161
],
'subSeqId'
:
0
,
'altSeqId'
:
[],
'dir'
:
'fprop'
,
'mod'
:
[
'Tensor'
],
'op'
:
[
'clone'
],
'tid'
:
1431533376
,
'device'
:
0
,
'stream'
:
7
,
'grid'
:
(
37440
,
1
,
1
),
'block'
:
(
128
,
1
,
1
),
'kLongName'
:
'void at::native::elementwise_kernel<128, 4, void at::native::gpu_kernel_impl<void at::native::copy_kernel_impl<float, float>(at::TensorIterator&)::{lambda(float)#1}>(at::TensorIterator&, void at::native::copy_kernel_impl<float, float>(at::TensorIterator&)::{lambda(float)#1} const&)::{lambda(int)#2}>(int, void at::native::gpu_kernel_impl<void at::native::copy_kernel_impl<float, float>(at::TensorIterator&)::{lambda(float)#1}>(at::TensorIterator&, void at::native::copy_kernel_impl<float, float>(at::TensorIterator&)::{lambda(float)#1} const&)::{lambda(int)#2})'
},
]
for
k
in
kernels
:
d
=
Data
(
k
)
mod
=
k
[
'mod'
]
op
=
k
[
'op'
]
xx
=
foo
(
mod
,
op
,
d
)
d
.
setParams
(
xx
.
params
())
def
run_tests
(
test_name
):
dummy
=
TestPyProfData
(
test_name
)
test_cases
=
list
(
filter
(
lambda
x
:
'test_'
in
x
,
map
(
lambda
x
:
x
[
0
],
inspect
.
getmembers
(
dummy
,
predicate
=
inspect
.
ismethod
))))
print
(
f
'Running tests for
{
test_name
}
'
)
suite
=
unittest
.
TestSuite
()
for
test_case
in
test_cases
:
suite
.
addTest
(
TestPyProfData
(
test_case
))
unittest
.
TextTestRunner
().
run
(
suite
)
if
__name__
==
'__main__'
:
run_tests
(
'test_data'
)
tests/L0/run_pyprof_nvtx/__init__.py
deleted
100644 → 0
View file @
ced59fcc
import
test_pyprof_nvtx.TestPyProfNvtx
as
TestPyProfNvtx
tests/L0/run_pyprof_nvtx/test_pyprof_nvtx.py
deleted
100644 → 0
View file @
ced59fcc
This diff is collapsed.
Click to expand it.
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