-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix parse string #57314
Merged
Merged
fix parse string #57314
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
87e2bb1
fix parse string
xingmingyyj 7e0726d
fix parse string
xingmingyyj ff3de7d
fix string
xingmingyyj 83980a1
fix string
8a7a33c
fix string
xingmingyyj c8bad7f
fix string
xingmingyyj ee646ca
Merge branch 'develop' into add_parser
xingmingyyj 2ca2976
fix codestyle
xingmingyyj 358f595
fix string
xingmingyyj 9abdb36
fix parse string
xingmingyyj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,70 @@ | ||
|
||
//CHECK attribute | ||
(String)sdfgs.sdsd | ||
(Array)[" File \"train.py\", line 225, in <module>", | ||
" main(args)", | ||
" File \"train.py\", line 197, in main", | ||
" lr_scheduler, args.profiler_options)", | ||
" File \"/home/PaddleClas/ppcls/static/program.py\", line 397, in run", | ||
" fetch_list=fetch_list)", | ||
" File \"/home/dy2stUpgrade/Paddle/build/python/paddle/fluid/executor.py\", line 1440, in run", | ||
" use_prune=use_prune,", | ||
" File \"/home/dy2stUpgrade/Paddle/build/python/paddle/fluid/executor.py\", line 1635, in _run_impl", | ||
" scope,", | ||
" File \"/home/dy2stUpgrade/Paddle/build/python/paddle/fluid/executor.py\", line 801, in get_program_and_executor", | ||
" scope,", | ||
" File \"/home/dy2stUpgrade/Paddle/build/python/paddle/fluid/executor.py\", line 866, in _get_program_and_executor", | ||
" use_fetch_v2=True,", | ||
" File \"/home/dy2stUpgrade/Paddle/build/python/paddle/fluid/executor.py\", line 411, in _add_feed_fetch_ops", | ||
" attrs={'col': i},", | ||
" File \"/home/dy2stUpgrade/Paddle/build/python/paddle/fluid/framework.py\", line 4056, in append_op", | ||
" attrs=kwargs.get(\"attrs\", None),", | ||
" File \"/home/dy2stUpgrade/Paddle/build/python/paddle/fluid/framework.py\", line 2818, in __init__", | ||
" for frame in traceback.extract_stack():"] | ||
//END | ||
|
||
//CHECK type | ||
f32 | ||
//END | ||
|
||
//CHECK type | ||
pd_op.tensor<256xf32> | ||
//END | ||
|
||
//CHECK program | ||
{ | ||
(%0) = "builtin.get_parameter" () {parameter_name:(String)conv2d_0.w_0} : () -> pd_op.tensor<64x3x7x7xf32> | ||
(%1) = "pd_op.feed" () {col:(Int32)0,is_persisable:(Array)[false],name:(String)data,stop_gradient:(Array)[true]} : () -> pd_op.tensor<-1x3x224x224xf32> | ||
(%2) = "pd_op.conv2d" (%1, %0) {data_format:(String)NCHW,dilations:(Array)[(Int32)1,(Int32)1],groups:(Int32)1,is_persisable:(Array)[false],padding_algorithm:(String)EXPLICIT,paddings:(Array)[(Int32)3,(Int32)3],stop_gradient:(Array)[false],strides:(Array)[(Int32)2,(Int32)2]} : (pd_op.tensor<-1x3x224x224xf32>, pd_op.tensor<64x3x7x7xf32>) -> pd_op.tensor<-1x64x112x112xf32> | ||
(%0) = "builtin.get_parameter" () {parameter_name:"conv2d_0.w_0"} : () -> pd_op.tensor<64x3x7x7xf32> | ||
(%1) = "pd_op.feed" () {col:(Int32)0,is_persisable:(Array)[false],name:"data",stop_gradient:(Array)[true]} : () -> pd_op.tensor<-1x3x224x224xf32> | ||
(%2) = "pd_op.conv2d" (%1, %0) {data_format:"NCHW",dilations:(Array)[(Int32)1,(Int32)1],groups:(Int32)1,is_persisable:(Array)[false],padding_algorithm:"EXPLICIT",paddings:(Array)[(Int32)3,(Int32)3],stop_gradient:(Array)[false],strides:(Array)[(Int32)2,(Int32)2]} : (pd_op.tensor<-1x3x224x224xf32>, pd_op.tensor<64x3x7x7xf32>) -> pd_op.tensor<-1x64x112x112xf32> | ||
} | ||
//END | ||
|
||
//CHECK attribute | ||
(Array)[(pd_op.DataType)bool,(pd_op.DataType)float32,(pd_op.DataType)float64, | ||
(pd_op.DataType)complex64,(pd_op.DataType)complex128,(pd_op.DataType)Undefined, | ||
(pd_op.DataType)Undefined,(pd_op.DataType)Undefined,(pd_op.DataType)Undefined, | ||
(pd_op.DataType)bfloat16,(pd_op.DataType)uint8,(pd_op.DataType)uint32,(pd_op.DataType)int8, | ||
(pd_op.DataType)uint16,(pd_op.DataType)int16,(pd_op.DataType)int32,(pd_op.DataType)uint64,(pd_op.DataType)int64] | ||
|
||
//END | ||
|
||
//CHECK attribute | ||
(Array)[(pd_op.Place)Place(gpu:0),(pd_op.Place)Place(gpu_pinned),(pd_op.Place)Place(gpu_pinned), | ||
(pd_op.Place)Place(xpu:0),(pd_op.Place)Place(ipu:0),(pd_op.Place)Place(:0),(pd_op.Place)Place(cpu)] | ||
|
||
//END | ||
|
||
//CHECK attribute | ||
(Array)[(pd_op.DataLayout)NHWC,(pd_op.DataLayout)STRIDED,(pd_op.DataLayout)NCHW,(pd_op.DataLayout)Undefined(AnyLayout), | ||
(pd_op.DataLayout)ONEDNN,(pd_op.DataLayout)SPARSE_COO,(pd_op.DataLayout)SPARSE_CSR,(pd_op.DataLayout)NDHWC,(pd_op.DataLayout)NCDHW, | ||
(pd_op.DataLayout)PSTRING_UNION] | ||
//END | ||
|
||
//CHECK attribute | ||
(Array)[(Double)1,(Int64)0,(String)1] | ||
(Array)[(Double)1,(Int64)0,"1"] | ||
//END | ||
|
||
//CHECK type | ||
vec[bf16,f64,b,i8,u8,i16,c64,c128] | ||
//END | ||
|
||
//CHECK attribute | ||
(String)1 | ||
(Array)["\"","\\"","\\\"","\t\n\r",""] | ||
//END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
接下来还需要优化下针对Array的parser,跟String类似,我们通过[]应该就可以识别,感觉没必要加一个Array,比较累赘
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
另外针对String Attribute补充一些测试用例吧,比如
之类的