Skip to content

Revert "Revert "Graphviz output improvements"" #4128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Jul 24, 2025

Conversation

pfultz2
Copy link
Collaborator

@pfultz2 pfultz2 commented Jul 9, 2025

Reverts #4127

@pfultz2 pfultz2 requested a review from causten as a code owner July 9, 2025 01:13
@pfultz2
Copy link
Collaborator Author

pfultz2 commented Jul 9, 2025

Posting this comment from the original PR for discussion.

I think it might be better to group operators instead of adding so many different colors. There is already some groups we can already colorize without needing the attributes:

  • Aliasing and context free(for operators like broadcast,squeeze,etc)
  • context free but not aliasing(all the builtin ref operators)
  • aliasing but not context free, so this will be all the lowered operators that take an output buffer
  • literals or instructions that have can_eval as true
  • Elementwise/Reduce?

And then we can use the attribute to customize the color beyond this. So we could give code_object_op a custom color.

Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 86.79245% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/graphviz.cpp 83.56% 12 Missing ⚠️
src/program.cpp 90.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4128      +/-   ##
===========================================
- Coverage    92.24%   92.21%   -0.03%     
===========================================
  Files          548      549       +1     
  Lines        25188    25288     +100     
===========================================
+ Hits         23233    23317      +84     
- Misses        1955     1971      +16     
Files with missing lines Coverage Δ
src/include/migraphx/op/binary.hpp 96.55% <100.00%> (ø)
src/include/migraphx/op/broadcast.hpp 97.50% <100.00%> (+0.06%) ⬆️
src/include/migraphx/op/broadcast_for_dot.hpp 100.00% <100.00%> (ø)
src/include/migraphx/op/broadcast_with_dims.hpp 100.00% <100.00%> (ø)
src/include/migraphx/op/convolution.hpp 94.74% <100.00%> (+0.11%) ⬆️
src/include/migraphx/op/pointwise.hpp 100.00% <100.00%> (ø)
src/include/migraphx/op/pooling.hpp 93.53% <100.00%> (+0.08%) ⬆️
src/include/migraphx/op/slice.hpp 95.43% <100.00%> (ø)
src/include/migraphx/op/unary.hpp 95.65% <100.00%> (ø)
src/module.cpp 86.62% <ø> (-0.26%) ⬇️
... and 2 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ethansaurusrex ethansaurusrex self-assigned this Jul 9, 2025
@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
0f6632
Rate old
3116c7
Diff Compare
torchvision-resnet50 64 3,245.57 3,231.21 0.44%
torchvision-resnet50_fp16 64 6,930.44 6,900.65 0.43%
torchvision-densenet121 32 2,449.57 2,440.20 0.38%
torchvision-densenet121_fp16 32 4,197.24 4,179.24 0.43%
torchvision-inceptionv3 32 1,636.52 1,628.68 0.48%
torchvision-inceptionv3_fp16 32 2,753.09 2,739.21 0.51%
cadene-inceptionv4 16 771.24 767.11 0.54%
cadene-resnext64x4 16 812.79 813.50 -0.09%
slim-mobilenet 64 7,459.20 7,431.61 0.37%
slim-nasnetalarge 64 211.12 210.06 0.50%
slim-resnet50v2 64 3,340.01 3,328.38 0.35%
bert-mrpc-onnx 8 1,146.42 1,142.17 0.37%
bert-mrpc-tf 1 456.85 456.61 0.05%
pytorch-examples-wlang-gru 1 376.72 338.11 11.42% 🔆
pytorch-examples-wlang-lstm 1 475.27 493.12 -3.62% 🔴
torchvision-resnet50_1 1 799.11 792.23 0.87%
cadene-dpn92_1 1 414.71 415.14 -0.10%
cadene-resnext101_1 1 392.85 387.17 1.47%
onnx-taau-downsample 1 395.46 394.99 0.12%
dlrm-criteoterabyte 1 33.77 33.68 0.28%
dlrm-criteoterabyte_fp16 1 51.22 51.07 0.31%
agentmodel 1 10,286.80 10,408.94 -1.17%
unet_fp16 2 60.74 60.57 0.28%
resnet50v1_fp16 1 1,032.41 1,037.10 -0.45%
resnet50v1_int8 1 1,052.33 1,072.74 -1.90%
bert_base_cased_fp16 64 1,170.01 1,163.18 0.59%
bert_large_uncased_fp16 32 361.26 359.68 0.44%
bert_large_fp16 1 203.24 202.75 0.24%
distilgpt2_fp16 16 2,238.31 2,228.04 0.46%
yolov5s 1 539.78 549.19 -1.71%
tinyllama 1 44.01 43.85 0.37%
vicuna-fastchat 1 45.27 45.05 0.48%
whisper-tiny-encoder 1 416.35 417.66 -0.31%
whisper-tiny-decoder 1 403.33 401.08 0.56%
llama2_7b 1 19.17 19.14 0.16%
qwen1.5-7b 1 23.61 23.56 0.18%
phi3-3.8b 1 26.88 26.77 0.42%
mask-rcnn 1 12.88 12.87 0.04%
llama3-8b 1 21.80 21.76 0.20%
whisper-large-encoder 1 10.22 10.18 0.40%
whisper-large-decoder 1 103.70 103.77 -0.06%
mistral-7b 1 23.88 23.80 0.35%
FLUX.1-schnell 1 766.55 771.67 -0.66%
nan nan nan nan nan%

This build is not recommended to merge 🔴

@migraphx-bot
Copy link
Collaborator


     ✅ bert-mrpc-onnx: PASSED: MIGraphX meets tolerance

❌bert-mrpc-tf: ERROR - check error outputerror: unknown warning option '-Wnrvo' [-Werror,-Wunknown-warning-option]

error: unknown warning option '-Wnrvo' [-Werror,-Wunknown-warning-option]

2025-07-17 13:26:03.358440: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE3 SSE4.1 SSE4.2 AVX AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1752776768.882081 182141 gpu_device.cc:2022] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 62973 MB memory: -> device: 0, name: AMD Instinct MI250X/MI250, pci bus id: 0000:b3:00.0
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1752776769.762492 182141 mlir_graph_optimization_pass.cc:401] MLIR V1 optimization pass is not enabled
2025-07-17 13:26:28.946514: E external/local_xla/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc:250] bitcode module is required by this HLO module but was not found at ./opencl.bc
2025-07-17 13:26:28.946583: E external/local_xla/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc:250] bitcode module is required by this HLO module but was not found at ./opencl.bc
2025-07-17 13:26:28.946647: E external/local_xla/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc:250] bitcode module is required by this HLO module but was not found at ./opencl.bc
2025-07-17 13:26:28.946987: E external/local_xla/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc:250] bitcode module is required by this HLO module but was not found at ./opencl.bc
2025-07-17 13:26:28.947026: E external/local_xla/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc:250] bitcode module is required by this HLO module but was not found at ./opencl.bc
2025-07-17 13:26:28.947089: E external/local_xla/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc:250] bitcode module is required by this HLO module but was not found at ./opencl.bc
2025-07-17 13:26:28.947163: E external/local_xla/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc:250] bitcode module is required by this HLO module but was not found at ./opencl.bc
2025-07-17 13:26:28.947226: E external/local_xla/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc:250] bitcode module is required by this HLO module but was not found at ./opencl.bc
error: Failure when generating HSACO
error: Failure when generating HSACO
error: Failure when generating HSACO
error: Failure when generating HSACO
error: Failure when generating HSACO
error: Failure when generating HSACO
error: Failure when generating HSACO
error: Failure when generating HSACO
2025-07-17 13:26:28.948526: E tensorflow/compiler/mlir/tools/kernel_gen/tf_framework_c_interface.cc:228] INTERNAL: Generating device code failed.
2025-07-17 13:26:28.949968: W tensorflow/core/framework/op_kernel.cc:1829] UNKNOWN: JIT compilation failed.
2025-07-17 13:26:28.949995: I tensorflow/core/framework/local_rendezvous.cc:405] Local rendezvous is aborting with status: UNKNOWN: JIT compilation failed.
[[{{node import/bert/embeddings/LayerNorm/moments/SquaredDifference}}]]
2025-07-17 13:26:28.950010: I tensorflow/core/framework/local_rendezvous.cc:405] Local rendezvous is aborting with status: UNKNOWN: JIT compilation failed.
[[{{node import/bert/embeddings/LayerNorm/moments/SquaredDifference}}]]
[[import/loss/output/_21]]
2025-07-17 13:26:28.950031: I tensorflow/core/framework/local_rendezvous.cc:424] Local rendezvous recv item cancelled. Key hash: 11217777527359497193
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/client/session.py", line 1407, in _do_call
return fn(*args)
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/client/session.py", line 1390, in _run_fn
return self._call_tf_sessionrun(options, feed_dict, fetch_list,
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/client/session.py", line 1483, in _call_tf_sessionrun
return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict,
tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found.
(0) UNKNOWN: JIT compilation failed.
[[{{node import/bert/embeddings/LayerNorm/moments/SquaredDifference}}]]
[[import/loss/output/_21]]
(1) UNKNOWN: JIT compilation failed.
[[{{node import/bert/embeddings/LayerNorm/moments/SquaredDifference}}]]
0 successful operations.
0 derived errors ignored.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 359, in
main()
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 335, in main
y_out = sess.run(y, feed_dict=tf_dict)
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/client/session.py", line 977, in run
result = self._run(None, fetches, feed_dict, options_ptr,
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/client/session.py", line 1220, in _run
results = self._do_run(handle, final_targets, final_fetches,
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/client/session.py", line 1400, in _do_run
return self._do_call(_run_fn, feeds, fetches, targets, options,
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/client/session.py", line 1426, in _do_call
raise type(e)(node_def, op, message) # pylint: disable=no-value-for-parameter
tensorflow.python.framework.errors_impl.UnknownError: Graph execution error:

Detected at node 'import/bert/embeddings/LayerNorm/moments/SquaredDifference' defined at (most recent call last):
Node: 'import/bert/embeddings/LayerNorm/moments/SquaredDifference'
Detected at node 'import/bert/embeddings/LayerNorm/moments/SquaredDifference' defined at (most recent call last):
Node: 'import/bert/embeddings/LayerNorm/moments/SquaredDifference'
2 root error(s) found.
(0) UNKNOWN: JIT compilation failed.
[[{{node import/bert/embeddings/LayerNorm/moments/SquaredDifference}}]]
[[import/loss/output/_21]]
(1) UNKNOWN: JIT compilation failed.
[[{{node import/bert/embeddings/LayerNorm/moments/SquaredDifference}}]]
0 successful operations.
0 derived errors ignored.

Original stack trace for 'import/bert/embeddings/LayerNorm/moments/SquaredDifference':


     ✅ pytorch-examples-wlang-gru: PASSED: MIGraphX meets tolerance

     ✅ pytorch-examples-wlang-lstm: PASSED: MIGraphX meets tolerance

     ✅ dlrm-criteoterabyte: PASSED: MIGraphX meets tolerance

     ✅ agentmodel: PASSED: MIGraphX meets tolerance

🔴unet: FAILED: MIGraphX is not within tolerance - check verbose output


     ✅ resnet50v1: PASSED: MIGraphX meets tolerance

     ✅ bert_base_cased_fp16: PASSED: MIGraphX meets tolerance

🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output


     ✅ bert_large: PASSED: MIGraphX meets tolerance

     ✅ yolov5s: PASSED: MIGraphX meets tolerance

     ✅ tinyllama: PASSED: MIGraphX meets tolerance

     ✅ vicuna-fastchat: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-encoder: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-decoder: PASSED: MIGraphX meets tolerance

     ✅ distilgpt2_fp16: PASSED: MIGraphX meets tolerance

     ✅ llama2_7b: PASSED: MIGraphX meets tolerance

     ✅ qwen1.5-7b: PASSED: MIGraphX meets tolerance

     ✅ phi3-3.8b: PASSED: MIGraphX meets tolerance

🔴mask-rcnn: FAILED: MIGraphX is not within tolerance - check verbose output


     ✅ llama3-8b: PASSED: MIGraphX meets tolerance

     ✅ whisper-large-decoder: PASSED: MIGraphX meets tolerance

     ✅ mistral-7b: PASSED: MIGraphX meets tolerance

     ✅ FLUX.1-schnell: PASSED: MIGraphX meets tolerance

@causten causten merged commit 1c289eb into develop Jul 24, 2025
37 of 41 checks passed
@causten causten deleted the revert-4127-revert-4101-graphviz-dev branch July 24, 2025 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants