From fa5e35a23d5680009b8d504caa0b2379ff2d40cd Mon Sep 17 00:00:00 2001 From: gigasquid Date: Sat, 31 Aug 2019 11:27:31 -0400 Subject: [PATCH 1/2] Fix flaky clojure profile test --- .../examples/profiler/test/core_test.clj | 3 +- .../test/profile-matmul-20iter.json.ref | 271 ------------------ 2 files changed, 1 insertion(+), 273 deletions(-) delete mode 100644 contrib/clojure-package/examples/profiler/test/profile-matmul-20iter.json.ref diff --git a/contrib/clojure-package/examples/profiler/test/core_test.clj b/contrib/clojure-package/examples/profiler/test/core_test.clj index 1173f0755bbd..9f03c94713b9 100644 --- a/contrib/clojure-package/examples/profiler/test/core_test.clj +++ b/contrib/clojure-package/examples/profiler/test/core_test.clj @@ -27,5 +27,4 @@ (deftest run-profiler (profiler/run) (let [new-file (clojure.java.io/as-file profiler/profiler-name)] - (is (.exists new-file)) - (is (> 10000 (- (System/currentTimeMillis) (.lastModified new-file)))))) \ No newline at end of file + (is (.exists new-file)))) diff --git a/contrib/clojure-package/examples/profiler/test/profile-matmul-20iter.json.ref b/contrib/clojure-package/examples/profiler/test/profile-matmul-20iter.json.ref deleted file mode 100644 index d6baa42114cd..000000000000 --- a/contrib/clojure-package/examples/profiler/test/profile-matmul-20iter.json.ref +++ /dev/null @@ -1,271 +0,0 @@ -{ - "traceEvents": [ - { - "ph": "M", - "args": { - "name": "cpu/0" - }, - "pid": 0, - "name": "process_name" - }, - { - "ph": "M", - "args": { - "name": "cpu/1" - }, - "pid": 1, - "name": "process_name" - }, - { - "ph": "M", - "args": { - "name": "cpu/2" - }, - "pid": 2, - "name": "process_name" - }, - { - "ph": "M", - "args": { - "name": "cpu/3" - }, - "pid": 3, - "name": "process_name" - }, - { - "ph": "M", - "args": { - "name": "cpu pinned/" - }, - "pid": 4, - "name": "process_name" - }, - { - "ph": "M", - "args": { - "name": "cpu shared/" - }, - "pid": 5, - "name": "process_name" - }, { - "ph": "M", - "args": { - "name": "MXNET_C_API" - }, - "pid": 13841910479334118176, - "name": "process_name" - }, - - { - "name": "MXNet C API Calls", - "cat": "MXNET_C_API", - "ph": "C", - "ts": 51195258331, - "args": { "MXNet C API Calls": 1 }, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } -, - { - "name": "MXNet C API Concurrency", - "cat": "MXNET_C_API", - "ph": "C", - "ts": 51195258338, - "args": { "MXNet C API Concurrency": 1 }, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } -, - { - "name": "MXExecutorForward", - "cat": "MXNET_C_API", - "ph": "b", - "ts": 51195258348, - "id": 6902988396839073221, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } -, - { - "name": "MXExecutorForward", - "cat": "MXNET_C_API", - "ph": "e", - "ts": 51195258357, - "id": 6902988396839073221, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } -, - { - "name": "MXNet C API Concurrency", - "cat": "MXNET_C_API", - "ph": "C", - "ts": 51195258358, - "args": { "MXNet C API Concurrency": 0 }, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } -, { - "ph": "M", - "args": { - "name": "Device Storage" - }, - "pid": 13545698322897290393, - "name": "process_name" - }, - - { - "name": "Memory: cpu/0", - "cat": "Device Storage", - "ph": "C", - "ts": 51195543378, - "args": { "Memory: cpu/0": 8 }, - "pid": 13545698322897290393, - "tid": 5603937861270119161 - } -, - { - "name": "MXNet C API Calls", - "cat": "MXNET_C_API", - "ph": "C", - "ts": 51195258559, - "args": { "MXNet C API Calls": 2 }, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } -, - { - "name": "Memory: cpu/0", - "cat": "Device Storage", - "ph": "C", - "ts": 51195857697, - "args": { "Memory: cpu/0": 67108872 }, - "pid": 13545698322897290393, - "tid": 5603937861270119161 - } -, - { - "name": "MXNet C API Concurrency", - "cat": "MXNET_C_API", - "ph": "C", - "ts": 51195258560, - "args": { "MXNet C API Concurrency": 1 }, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } -, - - { - "name": "[dot]", - "cat": "operator", - "ph": "B", - "ts": 51195857671, - "pid": 0, - "tid": 5603937861270119161 - } -, - { - "name": "[dot]", - "cat": "operator", - "ph": "E", - "ts": 51196931353, - "pid": 0, - "tid": 5603937861270119161 - } -, - - { - "name": "WaitForVar", - "cat": "operator", - "ph": "B", - "ts": 51196931369, - "pid": 0, - "tid": 5603937861270119161 - } -, - { - "name": "WaitForVar", - "cat": "operator", - "ph": "E", - "ts": 51196931376, - "pid": 0, - "tid": 5603937861270119161 - } -, { - "ph": "M", - "args": { - "name": "operator" - }, - "pid": 10847949044720084585, - "name": "process_name" - }, - - { - "name": "[dot]", - "cat": "operator", - "ph": "b", - "ts": 51195857671, - "id": 5603937861270119161, - "pid": 10847949044720084585, - "tid": 5603937861270119161 - } -, - { - "name": "[dot]", - "cat": "operator", - "ph": "e", - "ts": 51196931350, - "id": 5603937861270119161, - "pid": 10847949044720084585, - "tid": 5603937861270119161 - } -, - { - "name": "MXNDArrayWaitToRead", - "cat": "MXNET_C_API", - "ph": "b", - "ts": 51195258561, - "id": 6902988396839073221, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } -, - { - "name": "MXNDArrayWaitToRead", - "cat": "MXNET_C_API", - "ph": "e", - "ts": 51196931386, - "id": 6902988396839073221, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } -, - { - "name": "WaitForVar", - "cat": "operator", - "ph": "b", - "ts": 51196931369, - "id": 5603937861270119161, - "pid": 10847949044720084585, - "tid": 5603937861270119161 - } -, - { - "name": "WaitForVar", - "cat": "operator", - "ph": "e", - "ts": 51196931376, - "id": 5603937861270119161, - "pid": 10847949044720084585, - "tid": 5603937861270119161 - } -, - { - "name": "MXNet C API Concurrency", - "cat": "MXNET_C_API", - "ph": "C", - "ts": 51196931391, - "args": { "MXNet C API Concurrency": 0 }, - "pid": 13841910479334118176, - "tid": 6902988396839073221 - } From 6ce48b2db8ce22c4c2e9b7b006b37d647e05f0d9 Mon Sep 17 00:00:00 2001 From: gigasquid Date: Sat, 31 Aug 2019 14:37:24 -0400 Subject: [PATCH 2/2] disable profiler test --- contrib/clojure-package/integration-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/clojure-package/integration-tests.sh b/contrib/clojure-package/integration-tests.sh index 3df9ba9787b5..39cea6536c83 100755 --- a/contrib/clojure-package/integration-tests.sh +++ b/contrib/clojure-package/integration-tests.sh @@ -26,7 +26,7 @@ lein install # then run through the examples EXAMPLES_HOME=${MXNET_HOME}/contrib/clojure-package/examples # use AWK pattern for blacklisting -TEST_CASES=`find ${EXAMPLES_HOME} -name test | awk '!/dontselect1|cnn-text-classification|gan|neural-style|pre-trained-models/'` +TEST_CASES=`find ${EXAMPLES_HOME} -name test | awk '!/dontselect1|cnn-text-classification|gan|neural-style|pre-trained-models|profiler/'` for i in $TEST_CASES ; do cd ${i} && lein test done