chasingegg opened a new issue, #38623:
URL: https://github.com/apache/arrow/issues/38623

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   I have briefly go through the building related code, it seems that we can 
not use SSE4_2 simd level at runtime?
   ```
   template <typename KernelType>
   const KernelType* DispatchExactImpl(const std::vector<KernelType*>& kernels,
                                       const std::vector<TypeHolder>& values) {
     const KernelType* kernel_matches[SimdLevel::MAX] = {nullptr};
   
     // Validate arity
     for (const auto& kernel : kernels) {
       if (kernel->signature->MatchesInputs(values)) {
         kernel_matches[kernel->simd_level] = kernel;
       }
     }
   
     // Dispatch as the CPU feature
   #if defined(ARROW_HAVE_RUNTIME_AVX512) || defined(ARROW_HAVE_RUNTIME_AVX2)
     auto cpu_info = arrow::internal::CpuInfo::GetInstance();
   #endif
   #if defined(ARROW_HAVE_RUNTIME_AVX512)
     if (cpu_info->IsSupported(arrow::internal::CpuInfo::AVX512)) {
       if (kernel_matches[SimdLevel::AVX512]) {
         return kernel_matches[SimdLevel::AVX512];
       }
     }
   #endif
   #if defined(ARROW_HAVE_RUNTIME_AVX2)
     if (cpu_info->IsSupported(arrow::internal::CpuInfo::AVX2)) {
       if (kernel_matches[SimdLevel::AVX2]) {
         return kernel_matches[SimdLevel::AVX2];
       }
     }
   #endif
     if (kernel_matches[SimdLevel::NONE]) {
       return kernel_matches[SimdLevel::NONE];
     }
   
     return nullptr;
   }
   ```
   ARROW_HAVE_RUNTIME_SSE4_2 never used at runtime? Do I miss something, if 
this is a bug, I'd like to fix it.
   
   ### Component(s)
   
   C++


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to