Skip to content

Commit

Permalink
fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyu-intel committed Oct 31, 2023
1 parent db4bd31 commit 4591647
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion onnxruntime/contrib_ops/cpu/matmul_nbits_cpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MatMulNBitsCPU final : public OpKernel {

Status Compute(OpKernelContext* context) const override;
MLAS_BLK_QUANT_TYPE blk_quant_type_{BlkQ4Zp8};
BLK_QUANT_COMPUTE_TYPE compute_type_{CompInt8};
MLAS_COMPUTE_TYPE compute_type_{CompInt8};
};

Status MatMulNBitsCPU::Compute(OpKernelContext* ctx) const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@
#define __GNUC_PREREQ(major, minor) ((((__GNUC__) << 16) + (__GNUC_MINOR__)) >= (((major) << 16) + (minor)))
#endif
#if __GNUC_PREREQ(4, 3) && !defined(__APPLE__)
#include <cpuid.h>
#if !defined(signature_VORTEX_ebx) && !defined(signature_NEXGEN_ebx) && \
!defined(signature_AMD_ebx) // workaround for Bug 96238 - [i386] cpuid.h header needs include guards
#include <cpuid.h>
#endif
#else
#if defined(__APPLE__) && defined(XBYAK32) // avoid err : can't find a register in class `BREG' while reloading `asm'
#define __cpuid(eaxIn, a, b, c, d) __asm__ __volatile__("pushl %%ebx\ncpuid\nmovl %%ebp, %%esi\npopl %%ebx" : "=a"(a), "=S"(b), "=c"(c), "=d"(d) : "0"(eaxIn))
Expand Down

0 comments on commit 4591647

Please sign in to comment.