Repository: incubator-systemml Updated Branches: refs/heads/master 32924dc60 -> 9ed27ad60
[SYSTEMML-1552] Support GPU via Python MLContext API Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/9ed27ad6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/9ed27ad6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/9ed27ad6 Branch: refs/heads/master Commit: 9ed27ad6066a143a0e5ac5ccb800c7ca20e81ceb Parents: 32924dc Author: Niketan Pansare <npan...@us.ibm.com> Authored: Fri Apr 21 13:58:22 2017 -0800 Committer: Niketan Pansare <npan...@us.ibm.com> Committed: Fri Apr 21 14:58:22 2017 -0700 ---------------------------------------------------------------------- src/main/python/systemml/mlcontext.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/9ed27ad6/src/main/python/systemml/mlcontext.py ---------------------------------------------------------------------- diff --git a/src/main/python/systemml/mlcontext.py b/src/main/python/systemml/mlcontext.py index ecf4e5c..5619623 100644 --- a/src/main/python/systemml/mlcontext.py +++ b/src/main/python/systemml/mlcontext.py @@ -282,7 +282,7 @@ class MLContext(object): def __repr__(self): return "MLContext" - + def execute(self, script): """ Execute a DML / PyDML script. @@ -351,6 +351,17 @@ class MLContext(object): self._ml.setStatistics(bool(statistics)) return self + def setGPU(self, enable): + """ + Whether or not to enable GPU. + + Parameters + ---------- + enable: boolean + """ + self._ml.setGPU(bool(enable)) + return self + def setStatisticsMaxHeavyHitters(self, maxHeavyHitters): """ The maximum number of heavy hitters that are printed as part of the statistics.