提交 4151d90c 编写于 作者: L liuwei1031 提交者: Zeng Jinle

improve the hint message of memory optimize, test=develop (#18260)

上级 ff399fd7
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import logging
import multiprocessing import multiprocessing
import os import os
import six import six
...@@ -215,7 +214,8 @@ class CompiledProgram(object): ...@@ -215,7 +214,8 @@ class CompiledProgram(object):
self._build_strategy.enable_inplace = False self._build_strategy.enable_inplace = False
elif not self._build_strategy.memory_optimize or not self._build_strategy.enable_inplace: elif not self._build_strategy.memory_optimize or not self._build_strategy.enable_inplace:
# remind the user to try our memmory optimize strategy # remind the user to try our memmory optimize strategy
logging.warn(""" six.print_(
"""
You can try our memory optimize feature to save your memory usage: You can try our memory optimize feature to save your memory usage:
# create a build_strategy variable to set memory optimize option # create a build_strategy variable to set memory optimize option
build_strategy = compiler.BuildStrategy() build_strategy = compiler.BuildStrategy()
...@@ -236,7 +236,8 @@ class CompiledProgram(object): ...@@ -236,7 +236,8 @@ class CompiledProgram(object):
# if you need to fetch conv1, then: # if you need to fetch conv1, then:
conv1.persistable = True conv1.persistable = True
""") """,
file=sys.stderr)
return self return self
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册