Ignore:
Timestamp:
Dec 3, 2017, 2:54:34 PM (18 months ago)
Author:
cameron
Message:

idisa_target bug fix, eliminate braces around scalar initializer warning, disable lz4d_test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_target.cpp

    r5755 r5756  
    1313#include <llvm/ADT/Triple.h>
    1414#include <llvm/Support/ErrorHandling.h>
     15#include <llvm/Support/raw_ostream.h>
    1516#include <kernels/kernel_builder.h>
    1617
     
    2829    StringMap<bool> features;
    2930    if (sys::getHostCPUFeatures(features)) {
    30         hostCPUFeatures.hasAVX = features.count("avx");
    31         hostCPUFeatures.hasAVX2 = features.count("avx2");
     31        hostCPUFeatures.hasAVX = features.lookup("avx");
     32        hostCPUFeatures.hasAVX2 = features.lookup("avx2");
    3233    }
    3334    return hostCPUFeatures;
     
    3738    StringMap<bool> features;
    3839    if (sys::getHostCPUFeatures(features)) {
    39         return features.count("avx2");
     40        return features.lookup("avx2");
    4041    }
    4142    return false;
     
    4748    const auto hostCPUFeatures = getHostCPUFeatures();
    4849    if (LLVM_LIKELY(codegen::BlockSize == 0)) {  // No BlockSize override: use processor SIMD width
     50       
    4951        codegen::BlockSize = hostCPUFeatures.hasAVX2 ? 256 : 128;
    5052    }
     
    5254        llvm::report_fatal_error("BlockSize must be a power of 2 and >=64");
    5355    }
    54     if (codegen::BlockSize >= 128) {
     56    if (codegen::BlockSize >= 256) {
     57        // AVX2 or AVX builders can only be used for BlockSize multiples of 256
    5558        if (hostCPUFeatures.hasAVX2) {
    5659            return new KernelBuilderImpl<IDISA_AVX2_Builder>(C, codegen::BlockSize, codegen::BlockSize);
Note: See TracChangeset for help on using the changeset viewer.