wpan11nv commented on pull request #5424:
URL: https://github.com/apache/incubator-tvm/pull/5424#issuecomment-618591146


   Notably extra white spaces or scopes are removed. When the loop nesting or 
expression is deep, the emitted becomes unreadable.
    
   Before:
   `extern "C" __global__ void test_kernel0(void* __restrict__ B, void* 
__restrict__ A) {
     float4 _1;
     {
       float4 _2 = (( float4*)(( float*)A + ((((int)blockIdx.x) * 4))))[0];
       float4 _3 = make_float4(1.000000e+00f, 1.000000e+00f, 1.000000e+00f, 
1.000000e+00f);
       _1.x = (_2.x+_3.x);
       _1.y = (_2.y+_3.y);
       _1.z = (_2.z+_3.z);
       _1.w = (_2.w+_3.w);
     }
     (( float4*)(( float*)B + ((((int)blockIdx.x) * 4))))[0] = _1;
   }`
   
   After:
   `extern "C" __global__ void test_kernel0(void* __restrict__ B, void* 
__restrict__ A) {
     float4 _1;
     float4 _2 = ((float4*)((float*)A + ((((int)blockIdx.x) * 4))))[0];
     float4 _3 = make_float4(1.000000e+00f, 1.000000e+00f, 1.000000e+00f, 
1.000000e+00f);
     _1.x = (_2.x+_3.x);
     _1.y = (_2.y+_3.y);
     _1.z = (_2.z+_3.z);
     _1.w = (_2.w+_3.w);
     ((float4*)((float*)B + ((((int)blockIdx.x) * 4))))[0] = _1;
   }`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to