develop
2.0.1-rocm-post
release/2.0
ascendrc
release/1.8
test_benchmark_ci
revert-31562-mean
fix_imperative_dygraph_error
rocm_dev_0217
test_model_benchmark
test_model_benchmark_ci
revert-31068-fix_conv3d_windows
release/2.0-rc1
musl/disable_test_yolov3_temporarily
musl/fix_failed_unittests_in_musl
release/2.0-rc
TCChenlong-patch-1
revert-28284-dev/pybind_version
revert-27871-prv-conv-grad-opt
fix_doc_bugs
swt-req
release/2.0-beta
my_2.0rc
revert-27356-init_low_level_gloo
revert-27520-disable_pr
cancel_disable_ut
del_exclusive_ut_name_with_dist
modified_ut_name_with_dist
ut_move_night
disable_ut_1
ut_timeout_modifed
numel
revert-26856-strategy_example2
test_feature_precision_test_c
revert-24895-update_cub
fix_copy_if_different
fix-sync_batch_norm-hang-in-fleet
revert-24981-add_device_attr_for_regulization
v1.8
release/2.0-alpha
release/1.5
dump
revert-24314-dev/fix_err_msg
release/delete-2.0-beta
revert-22778-infer_var_type
revert-23830-2.0-beta
release/1.7
revert-22710-feature/integrated_ps_api
release/1.6
1.6.2
paddle_tiny_install
revert-21172-masked_select_api
custom_op_abi
yaoxuefeng
revert-20712-fix_depthwise_conv
cp#20629
python_error
revert-20384-cherry-pick_add_new_save_load_interface
cp#20282
API_fix
fix-eng-doc
fix-python-transpose
expand_as_op_1
new_fix
expand_as_op
sigmoid_bug
fix_crf_doc
padding_crf_3
assert
padding_crf_2
cp#19376
padding_in_crf
incubate/lite
DDDivano-patch-1
sum_op
release/lite-0.1
xsrobin-update1.5
cp#18377
nan-debug-tool
cp#18333
xsrobin-modify-version
lamb_update
revert-18229-add_multi_gpu_install_check
revert-18245-cherry-pick_install_check_for_multi_gpu
cp#17847
cp#18290
cp#18273
cherry_pick_1.5
test
lite
dependabot/pip/python/requests-2.20.0
enh_seq_pool
fix_ema
ema_dev
lamb_dev
resnext-opt
revert-17080-prepare_data
revert-17304-fix_default_paddle_version
fix_api_example
xiangyang-api
feature/fluid_trt_int8
release/1.4
release/0.15.0
update-0.15.0-readme
release/1.0.0
release/1.1
release/1.2
release/1.3
shanyi15-patch-1
mixed_precision_init
lod_len0
cherry-pick#16935
lod_reset_op_lod_level_fix_cherry
lod_reset_cherry
revert-16839-cmakelist_change
feature/anakin-engine3
revert-16650-refine_parallel_executor_3
feature/anakin-engine2
revert-16807-engine2-interface
fix_lod_reset
revert-16734-refine/test_imperative_transformer
devel
revert-16555-model_data_cryption_link_all_lib
1.4
move-code
feature/anakin-engine
revert-16303-checkpoint
revert-16190-refine_parallel_executor
ce_debug
align_pyramid
revert-15164-speed/enhance_cudnn
revert-16144-rnn_mem_opt
revert-16045-imperative_remove_desc
revert-16022-revert-15953-remove_default_stream_task_1
pr/16023
revert-15953-remove_default_stream_task_1
revert-15774-anakin_subgraph_engine
revert-15793-cherry-pick/update_protobuf
revert-15684-revert-15661-fix-cpu-broadcast
revert-15661-fix-cpu-broadcast
revert-15296-async_double_buffered_py_reader
revert-15470-feature/imperative
fix/ir_debug
inference-pre-release-gpu
recover_files
for_weibo
revert-15207-remove_op_handle_lock_and_fix_var
revert-14786-revert-14782-revert-14398-imperative
revert-14782-revert-14398-imperative
revert-14398-imperative
revert-14666-feature/estiminate_flops
local_add_cudnn_lstm
add_cudnn_lstm
f7c96f079b
dzhwinter-patch-1
pr/14530
panyx0718-patch-1
revert-14324-fix_vlog
fix-old-version-doc
fix_recordio_link
revert-13960-fix_1_release_1.0.0
ce
wojtuss/unique-patterns-request-comment
updatereadme
fix-readmd
revert-13872-fix2
revert-13866-revert-13821-fix
revert-13821-fix
revert-13787-revert-13637-optimize-opyreader
revert-13637-optimize-opyreader
develop_doc
fix-cmake-15
revert-13201-revert_callstack
fixCMakeFileInDoc2
fixCMakeFileInDoc
release/0.14.0
fix-install
fix-readme
fix-deadlinks
upload-readme-1
upload-readme
add-doc-readme
update-install-command
update-0.15.0script-1
fix-develop-build.sh
update-0.15.0script
test_new_api
JiabinYang-fix-doc
fix-deadlinks-in-readme
JiabinYang-patch-2
createGenDocLib
infer2
revert-12894-install_doc
revert-12759
revert-12736
revert-12864-feature/process_lod_grad
dataset_flowers_-_change_md5
revert-12469-sum_op_dim_fix
python3
revert-12646-feature/jit/xbyak
fea/anakin-support-x86
bugfix/anakin-compile
revert-12383-port_py3_syntax
distributed_test
release/0.13.0
guochaorong-patch-1
update-windows-install-doc
update-docker-image
fix-typo-of-install_doc
update-install-doc
refine-install_doc
analysis/code-clean
release/0.14.0_fix_split_bug
zcd_patch_release/0.14.0
ce-debug
revert-11792-release/0.14.0
fixTravisCI2
port
revert-11626-fix-log
wangkuiyi-patch-3
revert-11610-move_hooks
wangkuiyi-patch-1
master
release/0.12.0
shanyi15-patch-3
revert-10836-update-becbos-url
fix_gru_py
testDrivenUnderstandSentiment
testDrivenImageClassification
testDrivenLabelSemantic
testDrivenWord2Vec
updateRecognizeDigitTests
mkldnn-activations-improvments
scopeFix
simplify_fluid_api_recognize_digit
trainerSaveLoadParams
mobile_baidu
intel-update-authors
wangkuiyi-patch-2
fea/docker_cudnn7
helinwang-patch-1
shanyi15-patch-2
gh-pages
optimizer
tonyyang-svail-patch-1
fix_conll05_bug
release/0.11.0
yu239-patch-1
emailweixu-patch-1
add_depthwiseConv_op_gpu
fix-profile-doc-typo
update-read-source
detection_output_fixbug
cross_channel_norm
del_some_in_makelist
updateWriteDocsCN
helinwang-patch-2
fix-typo
revert-4814-Add_sequence_project_op
update-doc-pybind
tonyyang-svail-feed-op-desgin
enforce_failed
fix_batch_norm_parameter_share
fix_BatchNormLayer_cont_gen_parameter_name
Adaptive_data_structure_for_SwitchOrderLayer
fix_3908
revert-3824-remove_grad_op_type
fixstartbug
cblas_new
gangliao-patch-1
refactor_docs
release/0.10.0
feature/design_of_v2_layer_converter
0.10.0rc
avx_docs
front_page_cn
front_page_en
v2.0.1
v2.0.0
v2.0.0-rc1
v2.0.0-rc0
v1.8.5
v2.0.0-beta0
v1.8.4
v1.8.3
v1.8.2
v2.0.0-alpha0
v1.8.1
v1.8.0
v1.7.2
v1.7.1
v1.7.0
v1.6.3
v1.6.2
v1.6.1
v1.6.0
v1.6.0-rc0
v1.5.2
v1.5.1
lite-v0.1
v1.5.0
v1.4.1
v1.4.0
V0.8.0b0
V0.8.0b1
v0.10.0
v0.10.0rc
v0.10.0rc4
v0.11.0
v0.11.1a1
v0.11.1a2
v0.12.0
v0.13.0
v0.14.0
v0.15.0
v0.15.0-rc0
v0.9.0
v0.9.0a0
v1.0.0
v1.0.0-rc0
v1.0.1
v1.0.2
v1.1.0
v1.2.0
v1.2.1
v1.3.0
v1.3.1
v1.3.2
${ noResults }
10 Commits (17030ff28b9a54bb57779e9b8448a6d222110ec5)
Author | SHA1 | Message | Date |
---|---|---|---|
|
cf43a321a8
|
[Dy2stat] Refactoring tensor_shape_transformer.py to Fix Change after Assign Bug (#31082)
**Problem** In our old shape transformer logic, if user write: ``` s = tensor.shape ... y = paddle.some_api(s) ``` Dy2stat will change it to ``` ... y = paddle.some_api(convert_var_shape(tensor)) ``` However it will cause fatal bug if user changes the shape of `x` after assign. For example: ``` s = tensor.shape ... tensor = paddle.some_change_shape_api(tensor) ... y = paddle.some_api(s) ``` Then the Dy2stat will get wrong result because the code is translated into: ``` tensor = paddle.some_change_shape_api(tensor) ... y = paddle.some_api(convert_var_shape(tensor)) # tensor shape has been changed, not origin `s` value ``` **Solution Logic** It can not be solved in the old logic, so I refactoring tensor_shape_transformer logic. Now we will use `s` to store shape attribute and generate a var `s__STATIC_CONVERT_VAR_SHAPE_SUFFIX` to store static shape API `shape(tensor)` ``` s = tensor.shape ... y = paddle.some_api(s) ``` Dy2stat will change it to ``` s = tensor.shape s__STATIC_CONVERT_VAR_SHAPE_SUFFIX = shape(tensor) ... y = paddle.some_api(choose_shape_attr_or_api(s, s__STATIC_CONVERT_VAR_SHAPE_SUFFIX )) ``` In this case, the code is consistent with origin dygraph meaning and it fixed the change after assign bug. **Code Key Note** To help reviewers, the key change of this PR is changing `self.name_to_var_shape` from "mapping name to shape node" to "mapping name to its STATIC_CONVERT_VAR_SHAPE_SUFFIX name", then if a variable name has the SUFFIX, we can choose to use attribute shape or shape api. Other changes go with the key change. **Consideration** The issue of this PR is that we store extra static `shape` API result, will it harms the speed of Dy2stat? In some cases it will, but we argue that the benefit would be greater than the cost. 1. The extra calling to static `shape` API will happen when coder assign among shape variables. Take the following dygraph code as an instance: ``` s1 = tensor.shape s2 = s1 s3 = s2 ... ``` Then we called extra static `shape` APIs again and again, however users seldom write code like this. 2. If the shape variable is used a lot, for example: ``` s = tensor.shape y1 = paddle.some_api1(s) y2 = paddle.some_api2(s) y3 = paddle.some_api3(s) ``` Our old logic will create 3 shape APIs but now just 1. This is more common user code pattern. In fact, if reviewers take a look at the current unit test in this PR, you could see the op numbers decrease after this PR. So we argue that this PR can also improve speed in this code pattern. |
4 years ago |
|
b9a8ebd50f
|
[Dy2stat] Add a decorator paddle.jit.not_to_static to support that not to convert a function in Dynamic-to-Static. (#29253)
Usage scenarios:A function could have run successfully in static mode, you can use it to decorate a function in the following cases: 1. An unknown error occurs in the dynamic-to-static conversion process of the function; 2. In the internal implementation of the function, it has two branches: dynamic branch and static branch; 3. Users don't want to convert the function in the process of dynamic to static. |
4 years ago |
|
aec05d811c
|
[Dy2stat] Fix PaddleGan Deoldify Model Dy2stat Problems (#29226)
This PR fixes several problems in dy2stat for Deoldify model in PaddleGan. In model, software engineer wrote if x.shape == y.shape, the Tenser shape is a tuple in dygraph so the == returns True/False, but in static graph the == becomes element-wise comparison, which is a different behavior. In this PR we reduce the element-wise comparison result. If software engineer write computations which uses parameters in hooks, the static graph can loss the parameter variable because we put param_guard at forward of a Layer. In this PR we made param_guard cover pre-hook and post-hook. In PaddleGan, software engineer calculated some parameter values in __init__ by running some dygraph code. Those code also run during dy2stat. So some variables may be assign as a VarBase (Tensor) first and then Variable, which raised an error. We fixed the bug in this PR by handling the case. TODO: We just added testcase for the 1. shape comparison. Should add test case for 2. and 3. But since we are chasing 2.0RC, I will do it in the near future PR |
4 years ago |
|
a7433cc379
|
[Dy2Stat] Fix bug: the return statement should be transformed to an equivalent Paddle/Python if statement, which depends on if conditions of the return stmt. (#29165)
|
4 years ago |
|
682cc17f53
|
[Dynamic-to-Static] Fix bug: support pop from a dict and polish code of convert_pop (#29023)
* Support pop for dict in dy2stat * Move convert_pop to convert_operators.py and polish convert_pop |
4 years ago |
|
cc2fc93804
|
[Dy2stat] Refine Dy2stat APIs to 2.0rc (#27430)
Refine Dy2stat APIs to 2.0rc After discussion, we accepted 3 key points from reviewers: 1. In 2.0rc we changed dygraph_to_static folder to dy2static 2. Keep the three files: convert_call_func.py, convert_operators.py, variable_trans_func.py 3. Remove convert_operators path when users import convert_xxx. After this PR, users can import convert_xxx APIs by: `import paddle.jit.dy2static.convert_xxx` The file structure will be: ``` jit dy2static convert_operators.py convert_func_call.py variable_trans_func.py ``` Detail changed API in files: In python/paddle/jit/dygraph_to_static/convert_call_func.py: from ...fluid.dygraph.dygraph_to_static.convert_call_func import convert_call #DEFINE_ALIAS In python/paddle/jit/dygraph_to_static/convert_operators.py: from ...fluid.dygraph.dygraph_to_static.convert_operators import cast_bool_if_necessary #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_assert #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_ifelse #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_len #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_logical_and #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_logical_not #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_logical_or #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_print #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_var_dtype #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_var_shape #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.convert_operators import convert_while_loop #DEFINE_ALIAS In python/paddle/jit/dygraph_to_static/variable_trans_func.py: from ...fluid.dygraph.dygraph_to_static.variable_trans_func import create_fill_constant_node #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.variable_trans_func import create_static_variable_gast_node #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.variable_trans_func import data_layer_not_check #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.variable_trans_func import to_static_variable #DEFINE_ALIAS from ...fluid.dygraph.dygraph_to_static.variable_trans_func import to_static_variable_gast_node #DEFINE_ALIAS |
4 years ago |
|
209273e605
|
Support load state dict form `inference model` format save result (#26718)
* support load infer model format state dict * add unittests * remove keep name table * recolve circle inport * fix compatible problem * recover unittest * polish doc and comment |
5 years ago |
|
b1f9ed6006
|
[Dy2Stat] Add debugging and logging mechanism for dygraph to static (#26457)
* [Dy2Stat] Add debugging and logging mechanism for dygraph to static. * Remove TransformerError temporarily. * import mock in PY2, from unittest import mock in PY3. test=develop * Expose interfaces set_code_level and set_verbosity in paddle.jit, fix doc of the two interface. * polish doc of set_verbosity and set_code_level. |
5 years ago |
|
cfa086bdc1
|
Remove original name for alias APIs (#26195)
* fixed static module * solve conflict * remove original name for alias API |
5 years ago |
|
2efcb481c8
|
Paddle-2.0 API directory migration (#25898)
* Directory migration, test=develop * Change imperative from paddle init to paddle framework, test=develop * Fixed jit bug, test=develop * default static mode, test=develop * fixed format and create parameter belongs to framework, test=develop * Fixed import package, test=develop * fix __init__ format, test=develop * fixed alias problem * fixed paddle.enable_imperative problems, test=develop * Add unittest * delete install_check comment * Fixed unittest timeout * fixed unittest error * move Program default_xx_program to static package * optimize unittest method * fixed framework __init__ format * fixed jit path * delete alias * move jit to paddle * Fixed unittest format * fixed paddle.default_main_program * Fixed save load API in paddle __init__.py * fixed ci paddle.imperative.to_variable |
5 years ago |