Commit 371633d5 authored by Michael Carilli's avatar Michael Carilli
Browse files

Repr for import error

parent 59e992da
......@@ -282,7 +282,6 @@ def initialize(
_amp_state.opt_properties = opt_levels[opt_level](_amp_state.opt_properties)
maybe_print("Selected optimization level {}".format(opt_levels[opt_level].brief), True)
maybe_print("Defaults for this optimization level are:", True)
maybe_print(_amp_state.opt_properties.options, True)
for k, v in _amp_state.opt_properties.options.items():
maybe_print("{:22} : {}".format(k, v), True)
......
......@@ -49,7 +49,7 @@ class LossScaler(object):
"Warning: multi_tensor_applier fused unscale kernel is unavailable, "
"possibly because apex was installed without --cuda_ext --cpp_ext. "
"Using Python fallback. Original ImportError was: " +
multi_tensor_applier.import_err,
repr(multi_tensor_applier.import_err),
True)
LossScaler.has_fused_kernel = False
LossScaler.warned_no_fused_kernel = True
......
......@@ -55,7 +55,7 @@ set -e
print_banner "Installing Apex with --cuda_ext and --cpp_ext"
pushd ../../..
python setup.py install --cuda_ext --cpp_ext
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" .
popd
for opt_level in "${opt_levels[@]}"
......@@ -92,7 +92,7 @@ done
print_banner "Reinstalling apex without extensions"
pushd ../../..
python setup.py install
pip install -v --no-cache-dir .
popd
for opt_level in "${opt_levels[@]}"
......@@ -139,5 +139,5 @@ done
print_banner "Reinstalling Apex with --cuda_ext and --cpp_ext"
pushd ../../..
python setup.py install --cuda_ext --cpp_ext
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" .
popd
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment