Skip to content

Commit

Permalink
[SYSTEMML-1552] Support GPU via Python MLContext API
Browse files Browse the repository at this point in the history
  • Loading branch information
Niketan Pansare committed Apr 21, 2017
1 parent 32924dc commit 9ed27ad
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/python/systemml/mlcontext.py
Expand Up @@ -282,7 +282,7 @@ def __init__(self, sc):

def __repr__(self):
return "MLContext"

def execute(self, script):
"""
Execute a DML / PyDML script.
Expand Down Expand Up @@ -351,6 +351,17 @@ def setStatistics(self, statistics):
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.
Expand Down

0 comments on commit 9ed27ad

Please sign in to comment.