Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AmosLewis/8757d9abdee407151ca70cc0ce3ebc19 to your computer and use it in GitHub Desktop.
Save AmosLewis/8757d9abdee407151ca70cc0ce3ebc19 to your computer and use it in GitHub Desktop.
(shark.venv) ➜ SHARK git:(main) ✗ iree-compile chatglm-6b-int4.mlir --iree-input-type=tm_tensor --iree-vm-bytecode-module-output-format=flatbuffer-binary --iree-hal-target-backends=llvm-cpu --mlir-print-debuginfo --mlir-print-op-on-diagnostic=false --mlir-pass-pipeline-crash-reproducer=/nodclouddata/chi/src/SHARK/nan/dispatch/2/tmp/core-reproducer.mlir --iree-llvmcpu-target-cpu-features=host --iree-llvmcpu-target-triple=x86_64-linux-gnu --iree-llvmcpu-enable-ukernels --iree-llvmcpu-stack-allocation-limit=256000 --iree-global-opt-enable-quantized-matmul-reassociation --iree-stream-resource-max-allocation-size=4294967295 --iree-vm-bytecode-module-strip-source-map=true --iree-util-zero-fill-elided-attrs --iree-opt-strip-assertions=false --verify=true --iree-flow-break-dispatch=@forward:9 -o /tmp/chatglm9.vmfb
<eval_with_key>.5:38:41: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:173:43: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:191:43: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:202:43: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:220:43: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:355:43: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:373:43: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:384:43: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:402:43: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:537:43: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:555:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:566:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:584:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:719:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:737:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:748:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:766:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:901:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:919:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:930:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:948:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:1083:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:1101:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:1112:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:1130:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:1265:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:1283:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:1294:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:1312:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:1447:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:1465:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:1476:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:1494:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:1629:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:1647:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:1658:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:1676:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:1811:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:1829:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:1840:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:1858:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:1993:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:2011:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:2022:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:2040:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:2175:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:2193:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:2204:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:2222:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:2357:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:2375:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:2386:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:2404:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:2539:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:2557:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:2568:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:2586:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:2721:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:2739:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:2750:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:2768:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:2903:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:2921:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:2932:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:2950:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:3085:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:3103:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:3114:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:3132:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:3267:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:3285:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:3296:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:3314:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:3449:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:3467:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:3478:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:3496:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:3631:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:3649:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:3660:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:3678:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:3813:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:3831:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:3842:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:3860:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:3995:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:4013:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:4024:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:4042:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:4177:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:4195:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:4206:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:4224:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:4359:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:4377:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:4388:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:4406:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:4541:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:4559:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:4570:44: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:4588:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:4723:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:4741:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:4752:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:4770:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:4905:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:4923:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:4934:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:4952:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4608x64x64xi4>'
<eval_with_key>.5:5087:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x64x64xi4>'
<eval_with_key>.5:5105:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<27392x64x64xi4>'
<eval_with_key>.5:5116:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<4096x214x64xi4>'
<eval_with_key>.5:5134:45: warning: skipping consteval initializer: unsupported type for current jit configuration: 'tensor<65024x64x64xi4>'
(shark.venv) ➜ SHARK git:(main) ✗ iree-run-module \
--device=local-task \
--module="/tmp/chatglm9.vmfb" \
--function=forward \
--input="1x4xi64=1"
EXEC @forward
result[0]: hal.buffer_view
4x4608xf16=[-NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN -NAN...][...][...][...]
@AmosLewis
Copy link
Author

AmosLewis commented Dec 19, 2023

Then I try to run with --iree-flow-break-dispatch=@forward:9 --iree-flow-trace-dispatch-tensors

iree-compile chatglm-6b-int4.mlir --iree-input-type=tm_tensor --iree-vm-bytecode-module-output-format=flatbuffer-binary --iree-hal-target-backends=llvm-cpu --mlir-print-debuginfo --mlir-print-op-on-diagnostic=false --mlir-pass-pipeline-crash-reproducer=/nodclouddata/chi/src/SHARK/nan/dispatch/2/tmp/core-reproducer.mlir --iree-llvmcpu-target-cpu-features=host --iree-llvmcpu-target-triple=x86_64-linux-gnu --iree-llvmcpu-enable-ukernels --iree-llvmcpu-stack-allocation-limit=256000 --iree-global-opt-enable-quantized-matmul-reassociation --iree-stream-resource-max-allocation-size=4294967295 --iree-vm-bytecode-module-strip-source-map=true --iree-util-zero-fill-elided-attrs --iree-opt-strip-assertions=false --verify=true --iree-flow-break-dispatch=@forward:9 --iree-flow-trace-dispatch-tensors -o /tmp/chatglm9.vmfb > ./nan/dispatch/3/tmp/forwar9-dispatch-tensors.txt

But runs here for over 40 mins

......
=== jit_eval_5_dispatch_0::jit_eval_5_dispatch_0_slow_memcpy outputs ===
4x32xf16=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0][0.841309 0.681152 0.533203 0.40918 0.311035 0.234863 0.176758 0.132935 0.0997925 0.0749512 0.0562134 0.0421753 0.0316162 0.0237274 0.0177917 0.0133362 0.0100021 0.00749588 0.00562286 0.00421906 0.00316238 0.00237083 0.00177765 0.00133324 0.0010004 0.000749588 0.000562668 0.000421524 0.000316143 0.000237226 0.00017786 0.000133276][0.90918 0.997559 0.902344 0.746582 0.59082 0.456543 0.348145 0.263428 0.198608 0.149414 0.112244 0.0842285 0.0631714 0.0474243 0.0355835 0.0266724 0.0200043 0.0149918 0.0112457 0.00843811 0.00632477 0.00474167 0.0035553 0.00266647 0.00200081 0.00149918 0.00112534 0.000843048 0.000632286 0.000474453 0.000355721 0.000266552][0.141113 0.779297 0.993164 0.953613 0.8125 0.652344 0.508301 0.389404 0.29541 0.223145 0.167847 0.126099 0.0947266 0.071106 0.0533447 0.0400085 0.0299988 0.0224915 0.0168762 0.0126572 0.00949097 0.0071106 0.00533295 0.0039978 0.00300217 0.00224876 0.001688 0.00126457 0.000948429 0.000711441 0.000533581 0.000399828]

=== jit_eval_6_dispatch_0::jit_eval_6_dispatch_0_transpose inputs ===

=== jit_eval_6_dispatch_0::jit_eval_6_dispatch_0_transpose outputs ===
f16=0

=== jit_eval_8_dispatch_0::jit_eval_8_dispatch_0_generic_4x4_f32xf16xf16 inputs ===
f32=-INF
f16=0

=== jit_eval_8_dispatch_0::jit_eval_8_dispatch_0_generic_4x4_f32xf16xf16 outputs ===
4x4xf16=[0 -INF -INF -INF][0 0 -INF -INF][0 0 0 -INF][0 0 0 0]

The previous output looks good

@AmosLewis
Copy link
Author

AmosLewis commented Dec 19, 2023

Print dispatch 9 annotation with-mlir-print-ir-after=iree-flow-annotate-dispatches -mlir-elide-elementsattrs-if-larger=4
Then use iree-opt ./1218_chatglm_forward9-dispatch-tensors-annotation.mlir to elide the loc info
1218_chatglm_forward9-dispatch-tensors-annotation.mlir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment