mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Remove little endian asserts (#99713)
They block tests test_embedding_bag_2bit_unpack, test_embedding_bag_4bit_unpack and test_embedding_bag_byte_unpack in test/quantization/core/test_quantized_op.py. Without these asserts tests start passing on big endian systems. Fixes #97803 Pull Request resolved: https://github.com/pytorch/pytorch/pull/99713 Approved by: https://github.com/kit1980
This commit is contained in:
parent
c680f2b8ea
commit
1ded73f909
|
|
@ -32,8 +32,6 @@ class FloatToFused8BitRowwiseQuantizedOp : public Operator<Context> {
|
|||
USE_SIMPLE_CTOR_DTOR(FloatToFused8BitRowwiseQuantizedOp)
|
||||
|
||||
bool RunOnDevice() override {
|
||||
CAFFE_ENFORCE(IS_LITTLE_ENDIAN, "Unsupported endianness");
|
||||
|
||||
const auto& input = Input(DATA_FLOAT);
|
||||
|
||||
CAFFE_ENFORCE_GT(input.dim(), 0, "Input's dimension must be at least 1");
|
||||
|
|
@ -119,8 +117,6 @@ class Fused8BitRowwiseQuantizedToFloatOp : public Operator<Context> {
|
|||
USE_SIMPLE_CTOR_DTOR(Fused8BitRowwiseQuantizedToFloatOp)
|
||||
|
||||
bool RunOnDevice() override {
|
||||
CAFFE_ENFORCE(IS_LITTLE_ENDIAN, "Unsupported endianness");
|
||||
|
||||
const auto& input = Input(DATA_FUSED_SCALE_BIAS_INT8);
|
||||
|
||||
CAFFE_ENFORCE_GT(input.dim(), 0, "Input's dimension must be at least 1");
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ class FloatToFusedNBitRowwiseQuantizedOp final : public Operator<CPUContext> {
|
|||
~FloatToFusedNBitRowwiseQuantizedOp() override {}
|
||||
|
||||
bool RunOnDevice() override {
|
||||
CAFFE_ENFORCE(internal::is_little_endian(), "Unsupported endianness");
|
||||
|
||||
const auto& input = Input(DATA_FLOAT);
|
||||
|
||||
CAFFE_ENFORCE_GT(input.dim(), 0, "Input's dimension must be at least 1");
|
||||
|
|
@ -167,8 +165,6 @@ class FusedNBitRowwiseQuantizedToFloatOp final : public Operator<CPUContext> {
|
|||
~FusedNBitRowwiseQuantizedToFloatOp() override {}
|
||||
|
||||
bool RunOnDevice() override {
|
||||
CAFFE_ENFORCE(internal::is_little_endian(), "Unsupported endianness");
|
||||
|
||||
const auto& input = Input(DATA_FUSED_SCALE_BIAS);
|
||||
|
||||
CAFFE_ENFORCE_GT(input.dim(), 0, "Input's dimension must be at least 1");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user