Re: [Piglit] [PATCH] Allow one 'non-concurrent' test to run in parallel with concurrent tests again
Hi Michel, I recommend using the -c option. It will force concurrency for all tests. With that, I don't care which tests aren't concurrent by default. Marek On Wed, Aug 20, 2014 at 5:13 AM, Michel Dänzer mic...@daenzer.net wrote: From: Michel Dänzer michel.daen...@amd.com This reverts commit acb824ddc53c446124d88e37db610a4f8c59d56c. This decreases the runtime of the gpu.py profile from around 15 minutes to around 12 minutes on my machine, with no change in results. If in the future there are tests which really can't run in parallel with any other tests, a new category should be added for them. Signed-off-by: Michel Dänzer michel.daen...@amd.com --- framework/profile.py | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/framework/profile.py b/framework/profile.py index 5428890..1bb2b50 100644 --- a/framework/profile.py +++ b/framework/profile.py @@ -189,8 +189,6 @@ class TestProfile(object): self._pre_run_hook() framework.exectest.Test.OPTS = opts -chunksize = 1 - self._prepare_test_list(opts) log = Log(len(self.test_list), opts.verbose) @@ -203,30 +201,33 @@ class TestProfile(object): name, test = pair test.execute(name, log, json_writer, self.dmesg) -def run_threads(pool, testlist): - Open a pool, close it, and join it -pool.imap(test, testlist, chunksize) -pool.close() -pool.join() - # Multiprocessing.dummy is a wrapper around Threading that provides a # multiprocessing compatible API # # The default value of pool is the number of virtual processor cores single = multiprocessing.dummy.Pool(1) multi = multiprocessing.dummy.Pool() +chunksize = 1 if opts.concurrent == all: -run_threads(multi, self.test_list.iteritems()) +multi.imap(test, self.test_list.iteritems(), chunksize) elif opts.concurrent == none: -run_threads(single, self.test_list.iteritems()) +single.imap(test, self.test_list.iteritems(), chunksize) else: # Filter and return only thread safe tests to the threaded pool -run_threads(multi, (x for x in self.test_list.iteritems() -if x[1].run_concurrent)) +multi.imap(test, (x for x in self.test_list.iteritems() + if x[1].run_concurrent), chunksize) # Filter and return the non thread safe tests to the single pool -run_threads(single, (x for x in self.test_list.iteritems() - if not x[1].run_concurrent)) +single.imap(test, (x for x in self.test_list.iteritems() + if not x[1].run_concurrent), chunksize) + +# Close and join the pools +# If we don't close and the join the pools the script will exit before +# the pools finish running +multi.close() +single.close() +multi.join() +single.join() log.summary() -- 2.1.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Allow one 'non-concurrent' test to run in parallel with concurrent tests again
On 21.08.2014 17:57, Marek Olšák wrote: I recommend using the -c option. It will force concurrency for all tests. With that, I don't care which tests aren't concurrent by default. That might break the non-concurrent tests without a compositing manager, which I don't want to use for piglit as I explained before. I'll just continue using this patch locally if it isn't applied. I thought others might be interested in saving a little time for each piglit run by default, but apparently not. -- Earthling Michel Dänzer| http://www.amd.com Libre software enthusiast |Mesa and X developer ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Allow one 'non-concurrent' test to run in parallel with concurrent tests again
I actually agree with the patch. I was just making a suggestion. It seems nobody has NAK'd this patch yet. :) Marek On Thu, Aug 21, 2014 at 11:24 AM, Michel Dänzer mic...@daenzer.net wrote: On 21.08.2014 17:57, Marek Olšák wrote: I recommend using the -c option. It will force concurrency for all tests. With that, I don't care which tests aren't concurrent by default. That might break the non-concurrent tests without a compositing manager, which I don't want to use for piglit as I explained before. I'll just continue using this patch locally if it isn't applied. I thought others might be interested in saving a little time for each piglit run by default, but apparently not. -- Earthling Michel Dänzer| http://www.amd.com Libre software enthusiast |Mesa and X developer ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Allow one 'non-concurrent' test to run in parallel with concurrent tests again
On Aug 19, 2014 8:13 PM, Michel Dänzer mic...@daenzer.net wrote: From: Michel Dänzer michel.daen...@amd.com This reverts commit acb824ddc53c446124d88e37db610a4f8c59d56c. This decreases the runtime of the gpu.py profile from around 15 minutes to around 12 minutes on my machine, with no change in results. Do you use a compositing window manager? If so, then each window gets its own front buffer and you can use the -c option and run all the tests in parallel without problems. If you are not running a compositor then there could be a problem if the concurrent test pops up a window on top of the non-concurrent test. In this case the concurrent test's window would destroy the front buffer of the nom-concurrent test. This will only work if we can guarantee that the non-concurrent test doesn't pop up any windows. --Jason Ekstrand If in the future there are tests which really can't run in parallel with any other tests, a new category should be added for them. Signed-off-by: Michel Dänzer michel.daen...@amd.com --- framework/profile.py | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/framework/profile.py b/framework/profile.py index 5428890..1bb2b50 100644 --- a/framework/profile.py +++ b/framework/profile.py @@ -189,8 +189,6 @@ class TestProfile(object): self._pre_run_hook() framework.exectest.Test.OPTS = opts -chunksize = 1 - self._prepare_test_list(opts) log = Log(len(self.test_list), opts.verbose) @@ -203,30 +201,33 @@ class TestProfile(object): name, test = pair test.execute(name, log, json_writer, self.dmesg) -def run_threads(pool, testlist): - Open a pool, close it, and join it -pool.imap(test, testlist, chunksize) -pool.close() -pool.join() - # Multiprocessing.dummy is a wrapper around Threading that provides a # multiprocessing compatible API # # The default value of pool is the number of virtual processor cores single = multiprocessing.dummy.Pool(1) multi = multiprocessing.dummy.Pool() +chunksize = 1 if opts.concurrent == all: -run_threads(multi, self.test_list.iteritems()) +multi.imap(test, self.test_list.iteritems(), chunksize) elif opts.concurrent == none: -run_threads(single, self.test_list.iteritems()) +single.imap(test, self.test_list.iteritems(), chunksize) else: # Filter and return only thread safe tests to the threaded pool -run_threads(multi, (x for x in self.test_list.iteritems() -if x[1].run_concurrent)) +multi.imap(test, (x for x in self.test_list.iteritems() + if x[1].run_concurrent), chunksize) # Filter and return the non thread safe tests to the single pool -run_threads(single, (x for x in self.test_list.iteritems() - if not x[1].run_concurrent)) +single.imap(test, (x for x in self.test_list.iteritems() + if not x[1].run_concurrent), chunksize) + +# Close and join the pools +# If we don't close and the join the pools the script will exit before +# the pools finish running +multi.close() +single.close() +multi.join() +single.join() log.summary() -- 2.1.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Allow one 'non-concurrent' test to run in parallel with concurrent tests again
On 21.08.2014 05:42, Jason Ekstrand wrote: On Aug 19, 2014 8:13 PM, Michel Dänzer mic...@daenzer.net mailto:mic...@daenzer.net wrote: From: Michel Dänzer michel.daen...@amd.com mailto:michel.daen...@amd.com This reverts commit acb824ddc53c446124d88e37db610a4f8c59d56c. This decreases the runtime of the gpu.py profile from around 15 minutes to around 12 minutes on my machine, with no change in results. Do you use a compositing window manager? I'm not. I think a compositing manager is more likely to interfere with e.g. the sync/vblank related tests than running concurrent tests in parallel. If so, then each window gets its own front buffer and you can use the -c option and run all the tests in parallel without problems. If you are not running a compositor then there could be a problem if the concurrent test pops up a window on top of the non-concurrent test. In this case the concurrent test's window would destroy the front buffer of the nom-concurrent test. This will only work if we can guarantee that the non-concurrent test doesn't pop up any windows. AFAIK they don't, 'concurrent' implies using an FBO instead of a window. -- Earthling Michel Dänzer| http://www.amd.com Libre software enthusiast |Mesa and X developer ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Allow one 'non-concurrent' test to run in parallel with concurrent tests again
On Wednesday, August 20, 2014 12:13:11 PM Michel Dänzer wrote: From: Michel Dänzer michel.daen...@amd.com This reverts commit acb824ddc53c446124d88e37db610a4f8c59d56c. This decreases the runtime of the gpu.py profile from around 15 minutes to around 12 minutes on my machine, with no change in results. If in the future there are tests which really can't run in parallel with any other tests, a new category should be added for them. We already have such a category, non-concurrent. What has happened is a lot of people have cut and pasted all.py entries as non-concurrent without understanding what those flags do. I've tried several times reverse the flag (ie, concurrent by default), but it's a staggering amount of work. I feel that this is just a band-aid masking the real problem, because I suspect with the exception of glean there are probably no more than 100 tests that need to be run in serial. I'd rather see another effort like Marek's effort a year or so ago to fix tests that should have been marked concurrent but were not. However, that said this is not a NAK, if others want to go this way I won't stop it. Signed-off-by: Michel Dänzer michel.daen...@amd.com --- framework/profile.py | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/framework/profile.py b/framework/profile.py index 5428890..1bb2b50 100644 --- a/framework/profile.py +++ b/framework/profile.py @@ -189,8 +189,6 @@ class TestProfile(object): self._pre_run_hook() framework.exectest.Test.OPTS = opts -chunksize = 1 - self._prepare_test_list(opts) log = Log(len(self.test_list), opts.verbose) @@ -203,30 +201,33 @@ class TestProfile(object): name, test = pair test.execute(name, log, json_writer, self.dmesg) -def run_threads(pool, testlist): - Open a pool, close it, and join it -pool.imap(test, testlist, chunksize) -pool.close() -pool.join() - # Multiprocessing.dummy is a wrapper around Threading that provides a # multiprocessing compatible API # # The default value of pool is the number of virtual processor cores single = multiprocessing.dummy.Pool(1) multi = multiprocessing.dummy.Pool() +chunksize = 1 if opts.concurrent == all: -run_threads(multi, self.test_list.iteritems()) +multi.imap(test, self.test_list.iteritems(), chunksize) elif opts.concurrent == none: -run_threads(single, self.test_list.iteritems()) +single.imap(test, self.test_list.iteritems(), chunksize) else: # Filter and return only thread safe tests to the threaded pool -run_threads(multi, (x for x in self.test_list.iteritems() -if x[1].run_concurrent)) +multi.imap(test, (x for x in self.test_list.iteritems() + if x[1].run_concurrent), chunksize) # Filter and return the non thread safe tests to the single pool -run_threads(single, (x for x in self.test_list.iteritems() - if not x[1].run_concurrent)) +single.imap(test, (x for x in self.test_list.iteritems() + if not x[1].run_concurrent), chunksize) + +# Close and join the pools +# If we don't close and the join the pools the script will exit before +# the pools finish running +multi.close() +single.close() +multi.join() +single.join() log.summary() -- 2.1.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit signature.asc Description: This is a digitally signed message part. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] Allow one 'non-concurrent' test to run in parallel with concurrent tests again
From: Michel Dänzer michel.daen...@amd.com This reverts commit acb824ddc53c446124d88e37db610a4f8c59d56c. This decreases the runtime of the gpu.py profile from around 15 minutes to around 12 minutes on my machine, with no change in results. If in the future there are tests which really can't run in parallel with any other tests, a new category should be added for them. Signed-off-by: Michel Dänzer michel.daen...@amd.com --- framework/profile.py | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/framework/profile.py b/framework/profile.py index 5428890..1bb2b50 100644 --- a/framework/profile.py +++ b/framework/profile.py @@ -189,8 +189,6 @@ class TestProfile(object): self._pre_run_hook() framework.exectest.Test.OPTS = opts -chunksize = 1 - self._prepare_test_list(opts) log = Log(len(self.test_list), opts.verbose) @@ -203,30 +201,33 @@ class TestProfile(object): name, test = pair test.execute(name, log, json_writer, self.dmesg) -def run_threads(pool, testlist): - Open a pool, close it, and join it -pool.imap(test, testlist, chunksize) -pool.close() -pool.join() - # Multiprocessing.dummy is a wrapper around Threading that provides a # multiprocessing compatible API # # The default value of pool is the number of virtual processor cores single = multiprocessing.dummy.Pool(1) multi = multiprocessing.dummy.Pool() +chunksize = 1 if opts.concurrent == all: -run_threads(multi, self.test_list.iteritems()) +multi.imap(test, self.test_list.iteritems(), chunksize) elif opts.concurrent == none: -run_threads(single, self.test_list.iteritems()) +single.imap(test, self.test_list.iteritems(), chunksize) else: # Filter and return only thread safe tests to the threaded pool -run_threads(multi, (x for x in self.test_list.iteritems() -if x[1].run_concurrent)) +multi.imap(test, (x for x in self.test_list.iteritems() + if x[1].run_concurrent), chunksize) # Filter and return the non thread safe tests to the single pool -run_threads(single, (x for x in self.test_list.iteritems() - if not x[1].run_concurrent)) +single.imap(test, (x for x in self.test_list.iteritems() + if not x[1].run_concurrent), chunksize) + +# Close and join the pools +# If we don't close and the join the pools the script will exit before +# the pools finish running +multi.close() +single.close() +multi.join() +single.join() log.summary() -- 2.1.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit