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

Repr for import error

parent 59e992da
...@@ -282,7 +282,6 @@ def initialize( ...@@ -282,7 +282,6 @@ def initialize(
_amp_state.opt_properties = opt_levels[opt_level](_amp_state.opt_properties) _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("Selected optimization level {}".format(opt_levels[opt_level].brief), True)
maybe_print("Defaults for this optimization level are:", 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(): for k, v in _amp_state.opt_properties.options.items():
maybe_print("{:22} : {}".format(k, v), True) maybe_print("{:22} : {}".format(k, v), True)
......
...@@ -49,7 +49,7 @@ class LossScaler(object): ...@@ -49,7 +49,7 @@ class LossScaler(object):
"Warning: multi_tensor_applier fused unscale kernel is unavailable, " "Warning: multi_tensor_applier fused unscale kernel is unavailable, "
"possibly because apex was installed without --cuda_ext --cpp_ext. " "possibly because apex was installed without --cuda_ext --cpp_ext. "
"Using Python fallback. Original ImportError was: " + "Using Python fallback. Original ImportError was: " +
multi_tensor_applier.import_err, repr(multi_tensor_applier.import_err),
True) True)
LossScaler.has_fused_kernel = False LossScaler.has_fused_kernel = False
LossScaler.warned_no_fused_kernel = True LossScaler.warned_no_fused_kernel = True
......
...@@ -55,7 +55,7 @@ set -e ...@@ -55,7 +55,7 @@ set -e
print_banner "Installing Apex with --cuda_ext and --cpp_ext" print_banner "Installing Apex with --cuda_ext and --cpp_ext"
pushd ../../.. pushd ../../..
python setup.py install --cuda_ext --cpp_ext pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" .
popd popd
for opt_level in "${opt_levels[@]}" for opt_level in "${opt_levels[@]}"
...@@ -92,7 +92,7 @@ done ...@@ -92,7 +92,7 @@ done
print_banner "Reinstalling apex without extensions" print_banner "Reinstalling apex without extensions"
pushd ../../.. pushd ../../..
python setup.py install pip install -v --no-cache-dir .
popd popd
for opt_level in "${opt_levels[@]}" for opt_level in "${opt_levels[@]}"
...@@ -139,5 +139,5 @@ done ...@@ -139,5 +139,5 @@ done
print_banner "Reinstalling Apex with --cuda_ext and --cpp_ext" print_banner "Reinstalling Apex with --cuda_ext and --cpp_ext"
pushd ../../.. pushd ../../..
python setup.py install --cuda_ext --cpp_ext pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" .
popd 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