Skip to content

Commit 60f41b7

Browse files
disable llm_int8 ut
1 parent 773ea41 commit 60f41b7

File tree

1 file changed

+13
-77
lines changed

1 file changed

+13
-77
lines changed

test/quantization/test_llm_int8_linear.py

Lines changed: 13 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@
1515
import unittest
1616

1717
import numpy as np
18-
from test_weight_only_linear import convert_uint16_to_float, get_cuda_version
18+
from test_weight_only_linear import convert_uint16_to_float
1919

2020
import paddle
2121
import paddle.nn.quant as Q
2222
from paddle import base
23-
from paddle.base import core
2423
from paddle.base.framework import default_main_program
2524
from paddle.framework import set_default_dtype
2625
from paddle.pir_utils import test_with_pir_api
@@ -30,12 +29,7 @@
3029
default_main_program().random_seed = 42
3130

3231

33-
@unittest.skipIf(
34-
not core.is_compiled_with_cuda()
35-
or get_cuda_version() < 11020
36-
or paddle.device.cuda.get_device_capability()[0] < 8,
37-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
38-
)
32+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
3933
class LLMInt8LinearTestCase(unittest.TestCase):
4034
def config(self):
4135
self.dtype = 'float16'
@@ -149,25 +143,15 @@ def test_llm_int8_linear(self):
149143
)
150144

151145

152-
@unittest.skipIf(
153-
not core.is_compiled_with_cuda()
154-
or get_cuda_version() < 11020
155-
or paddle.device.cuda.get_device_capability()[0] < 8,
156-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
157-
)
146+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
158147
class LLMInt8LinearTestCase1(LLMInt8LinearTestCase):
159148
def config(self):
160149
super().config()
161150
self.dtype = 'float16'
162151
self.weight_dtype = "int8"
163152

164153

165-
@unittest.skipIf(
166-
not core.is_compiled_with_cuda()
167-
or get_cuda_version() < 11020
168-
or paddle.device.cuda.get_device_capability()[0] < 8,
169-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
170-
)
154+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
171155
class LLMInt8LinearTestCase2(LLMInt8LinearTestCase):
172156
def config(self):
173157
super().config()
@@ -176,39 +160,23 @@ def config(self):
176160
self.weight_dtype = "int8"
177161

178162

179-
@unittest.skipIf(
180-
not core.is_compiled_with_cuda()
181-
or get_cuda_version() < 11020
182-
or paddle.device.cuda.get_device_capability()[0] < 8,
183-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
184-
)
163+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
185164
class LLMInt8LinearTestCase3(LLMInt8LinearTestCase):
186165
def config(self):
187166
super().config()
188167
self.dtype = 'bfloat16'
189168
self.weight_dtype = "int8"
190169

191170

192-
@unittest.skipIf(
193-
not core.is_compiled_with_cuda()
194-
or get_cuda_version() < 11020
195-
or paddle.device.cuda.get_device_capability()[0] < 8
196-
or not core.is_bfloat16_supported(core.CUDAPlace(0)),
197-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8 or core is not support bfloat16",
198-
)
171+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
199172
class LLMInt8LinearTestCase4(LLMInt8LinearTestCase):
200173
def config(self):
201174
super().config()
202175
self.dtype = 'float16'
203176
self.weight_dtype = "int4"
204177

205178

206-
@unittest.skipIf(
207-
not core.is_compiled_with_cuda()
208-
or get_cuda_version() < 11020
209-
or paddle.device.cuda.get_device_capability()[0] < 8,
210-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
211-
)
179+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
212180
class LLMInt8LinearTestCase5(LLMInt8LinearTestCase):
213181
def config(self):
214182
super().config()
@@ -217,26 +185,15 @@ def config(self):
217185
self.weight_dtype = "int4"
218186

219187

220-
@unittest.skipIf(
221-
not core.is_compiled_with_cuda()
222-
or get_cuda_version() < 11020
223-
or paddle.device.cuda.get_device_capability()[0] < 8
224-
or not core.is_bfloat16_supported(core.CUDAPlace(0)),
225-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8 or core is not support bfloat16",
226-
)
188+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
227189
class LLMInt8LinearTestCase6(LLMInt8LinearTestCase):
228190
def config(self):
229191
super().config()
230192
self.dtype = 'bfloat16'
231193
self.weight_dtype = "int4"
232194

233195

234-
@unittest.skipIf(
235-
not core.is_compiled_with_cuda()
236-
or get_cuda_version() < 11020
237-
or paddle.device.cuda.get_device_capability()[0] < 8,
238-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
239-
)
196+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
240197
class LLMInt8LinearTestCase7(LLMInt8LinearTestCase):
241198
def config(self):
242199
super().config()
@@ -246,12 +203,7 @@ def config(self):
246203
self.token = 1
247204

248205

249-
@unittest.skipIf(
250-
not core.is_compiled_with_cuda()
251-
or get_cuda_version() < 11020
252-
or paddle.device.cuda.get_device_capability()[0] < 8,
253-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
254-
)
206+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
255207
class LLMInt8LinearTestCase8(LLMInt8LinearTestCase):
256208
def config(self):
257209
super().config()
@@ -262,12 +214,7 @@ def config(self):
262214
self.token = 1
263215

264216

265-
@unittest.skipIf(
266-
not core.is_compiled_with_cuda()
267-
or get_cuda_version() < 11020
268-
or paddle.device.cuda.get_device_capability()[0] < 8,
269-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
270-
)
217+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
271218
class LLMInt8LinearTestCase9(LLMInt8LinearTestCase):
272219
def config(self):
273220
super().config()
@@ -277,12 +224,7 @@ def config(self):
277224
self.token = 1
278225

279226

280-
@unittest.skipIf(
281-
not core.is_compiled_with_cuda()
282-
or get_cuda_version() < 11020
283-
or paddle.device.cuda.get_device_capability()[0] < 8,
284-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
285-
)
227+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
286228
class LLMInt8LinearTestCase10(LLMInt8LinearTestCase):
287229
def config(self):
288230
super().config()
@@ -293,13 +235,7 @@ def config(self):
293235
self.token = 1
294236

295237

296-
@unittest.skipIf(
297-
not core.is_compiled_with_cuda()
298-
or not core.is_compiled_with_cuda()
299-
or get_cuda_version() < 11020
300-
or paddle.device.cuda.get_device_capability()[0] < 8,
301-
"quantized_matmul requires CUDA >= 11.2 and CUDA_ARCH >= 8",
302-
)
238+
@unittest.skipIf(True, "Disable this unit test in release/2.6")
303239
class LLMInt8LinearTestCaseStatic(LLMInt8LinearTestCase):
304240
def config(self):
305241
super().config()

0 commit comments

Comments
 (0)