File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed 
inference/analysis/ir_passes Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ REGISTER_PASS_CAPABILITY(tensorrt_subgraph_pass)
392392            .EQ(" shuffle_channel" 0 )
393393            .EQ(" swish" 0 )
394394            .EQ(" split" 0 )
395-             .EQ (" instance_norm" 0 )
395+             .LE (" instance_norm" 1 )
396396            .EQ(" gelu" 0 )
397397            .EQ(" layer_norm" 0 )
398398            .EQ(" scale" 0 )
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ limitations under the License. */
1717#include  < string> 
1818#include  < unordered_map> 
1919#include  " paddle/fluid/framework/data_layout.h" 
20+ #include  " paddle/fluid/framework/op_version_registry.h" 
2021#include  " paddle/fluid/operators/math/math_function.h" 
2122
2223namespace  paddle  {
@@ -701,3 +702,20 @@ REGISTER_OP_CPU_KERNEL(
701702                                      float >,
702703    ops::InstanceNormDoubleGradKernel<paddle::platform::CPUDeviceContext,
703704                                      double >);
705+ 
706+ REGISTER_OP_VERSION (instance_norm)
707+     .AddCheckpoint(
708+         R"ROC( 
709+       Change dispensable of attribute from False to True in instance_norm. 
710+     )ROC"  ,
711+         paddle::framework::compatible::OpVersionDesc ()
712+             .ModifyAttr(
713+                 " Bias" 
714+                 " The arg 'dispensable' of Input 'Bias' is changed: from " 
715+                 " 'False' to 'True'." 
716+                 true )
717+             .ModifyAttr(
718+                 " Scale" 
719+                 " The arg 'dispensable' of Input 'Scale' is changed: from " 
720+                 " 'False' to 'True'." 
721+                 true ));
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments