Skip to content

Commit ed1db7a

Browse files
clean up temp, experimental codes
Signed-off-by: cliu-us <[email protected]>
1 parent b64e07b commit ed1db7a

File tree

3 files changed

+1
-1651
lines changed

3 files changed

+1
-1651
lines changed

examples/QAT_INT8/run_qa_no_trainer_qat.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,6 @@ def parse_args():
393393
default=None,
394394
help="convert QAT model to utilize real INT8 GPU kernel, 'cutlass' or 'triton'",
395395
)
396-
parser.add_argument(
397-
"--verify_preccfg",
398-
type=str,
399-
default=None,
400-
help="Path to an old version of AIU checkpoint, which should have a precconfig.json",
401-
)
402396

403397
args = parser.parse_args()
404398

@@ -1201,18 +1195,6 @@ def speedtest(model, exam_inp, Ntest=100):
12011195

12021196
return
12031197

1204-
elif args.verify_preccfg:
1205-
# Local
1206-
from fms_mo.utils.aiu_utils import verify_preccfg
1207-
1208-
exam_inp = next(iter(train_dataloader))
1209-
1210-
model_aiu = verify_preccfg(args.verify_preccfg, exam_inp, sim_level=3)
1211-
1212-
metrics = squad_eval(model_aiu)
1213-
logger.info(metrics)
1214-
return
1215-
12161198
# ----------------------------------------------------
12171199

12181200
# Only show the progress bar once on each machine.

fms_mo/custom_ext_kernels/triton_kernels.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,7 @@ def imatmul_kernel(
235235
accumulator = tl.zeros((BLOCK_SIZE_M, BLOCK_SIZE_N), dtype=tl.int32)
236236
## ------ prepare LSB rounding/truncation masks -------
237237
round_bit = 1 << (chunk_trun_bits - 1) if chunk_trun_bits > 0 else 0
238-
# full_32b_mask = 0xFFFFFFFF
239-
# trun_mask = (full_32b_mask << chunk_trun_bits) & full_32b_mask
238+
msb_mask = 0x00FFFFFF # only needed when simulating truncation on MSB
240239
## ---------------------------------------------------------
241240

242241
for k in range(0, tl.cdiv(K, BLOCK_SIZE_K)):

0 commit comments

Comments
 (0)