TaoLv edited a comment on issue #17047: Add build flag for x86 arch
URL: https://github.com/apache/incubator-mxnet/pull/17047#issuecomment-564918587
 
 
   I see. Not sure if it's a problem of the documentation or the stale version 
of compiler. Running `gcc -Q --help=target -march=native` with gcc 7.3, my 
cascade lake machine is identified as knl and -mtune is set to generic. :(
   
   Is the below logic good to you?
   ```
   ifneq ($(USE_X86_ARCH), NONE)
        CFLAGS += -march=$(USE_X86_ARCH) -mtune=$(USE_X86_ARCH)
   endif
   ```
   =====================
   **Update**: Test `gcc -Q --help=target -march=native -mtune=native`,
   with gcc 4.8.5
   - on broadwell E5, -march is identified as core-avx2 and -mtune as generic.
   - on cascade lake machine, -march is identified as core-avx2 and -mtune as 
generic.
   
   with gcc 7.3,
   - on broadwell E5, -march is identified as haswell and -mtune as haswell.
   - on cascade lake machine, -march is identified as knl and -mtune as generic.
   
   with gcc 8.3,
   - on cascade lake machine, -march is identified as skylake-avx512 and -mtune 
as skylake-avx512.
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to