Skip to content

Conversation

TedThemistokleous
Copy link
Collaborator

@TedThemistokleous TedThemistokleous commented Aug 27, 2025

Motivation

Add cubic resize functionality for resize op

Technical Details

Related to customer support and or adding functionality to resize we're seeing in the depthanything model

Changelog Category

    • Added: New functionality.
    • Changed: Changes to existing functionality.
    • Removed: Functionality or support that has been removed. (Compared to a previous release)
    • Optimized: Component performance that has been optimized or improved.
    • Resolved Issues: Known issues from a previous version that have been resolved.
    • Not Applicable: This PR is not to be included in the changelog.

Generate the following test cases
One that mirrors customer workoad (one using a specific coefficient)
one with scales
one with sizes

Get parser tests started looking at the model and then use these to test what we're seeing with the depth anything model resizes
@TedThemistokleous TedThemistokleous self-assigned this Aug 27, 2025
@TedThemistokleous TedThemistokleous added roadmap Tasks to finish for a release Onnx Operators Adding or modifying an Onnx Operator in the MIGraphX codebase labels Aug 27, 2025
Work in progress. will need to be tested/validated and other items ironed out
Use this to generate keyvalues based on the input sampling selected to be used for generating the proper 1d convolution kernel. Remove this for now and perform

Remove previous way to things as this needs to be handle on a per input basees after the up/downsample
Use this to generate the approrpaite matrix  for each channels cubic coefficients to perform the required interpolation per dimension. Should handle up and down scales
Supporting calls (Kronker product and co) still in works but the overall structure for this should be repeatable regardless of what kernel is used here
Matrix setup and muls for each dimension
…al alloc

Work on the preocmputed matrix data to get a smaller and optimized matrix instead of relying on our const propigation to fold a bunch of literals during ocmpile time. This results in one final matrix after all transformations have been precomputed based on the scale per dimension
@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
3a689e
Rate old
309327
Diff Compare
torchvision-resnet50 64 3,158.51 3,157.53 0.03%
torchvision-resnet50_fp16 64 6,579.53 6,589.14 -0.15%
torchvision-densenet121 32 2,433.13 2,437.80 -0.19%
torchvision-densenet121_fp16 32 4,113.49 4,124.23 -0.26%
torchvision-inceptionv3 32 1,664.87 1,665.89 -0.06%
torchvision-inceptionv3_fp16 32 2,581.58 2,588.62 -0.27%
cadene-inceptionv4 16 793.85 795.22 -0.17%
cadene-resnext64x4 16 801.58 802.58 -0.12%
slim-mobilenet 64 8,203.62 8,208.64 -0.06%
slim-nasnetalarge 64 221.66 221.68 -0.01%
slim-resnet50v2 64 3,294.67 3,294.76 -0.00%
bert-mrpc-onnx 8 1,131.01 1,136.35 -0.47%
bert-mrpc-tf 1 481.57 485.59 -0.83%
pytorch-examples-wlang-gru 1 210.01 390.54 -46.23% 🔴
pytorch-examples-wlang-lstm 1 291.16 446.50 -34.79% 🔴
torchvision-resnet50_1 1 787.71 800.74 -1.63%
cadene-dpn92_1 1 413.20 432.44 -4.45% 🔴
cadene-resnext101_1 1 368.90 361.00 2.19%
onnx-taau-downsample 1 396.60 397.34 -0.19%
dlrm-criteoterabyte 1 31.91 31.92 -0.04%
dlrm-criteoterabyte_fp16 1 50.99 51.01 -0.04%
agentmodel 1 8,773.70 9,572.58 -8.35% 🔴
unet_fp16 2 58.78 59.01 -0.38%
resnet50v1_fp16 1 976.87 991.47 -1.47%
resnet50v1_int8 1 968.10 988.05 -2.02%
bert_base_cased_fp16 64 1,107.89 1,098.07 0.89%
bert_large_uncased_fp16 32 343.68 343.77 -0.03%
bert_large_fp16 1 197.22 197.89 -0.34%
distilgpt2_fp16 16 2,093.53 2,074.82 0.90%
yolov5s 1 581.55 587.93 -1.09%
tinyllama 1 43.76 43.79 -0.07%
vicuna-fastchat 1 45.07 44.86 0.48%
whisper-tiny-encoder 1 409.38 409.89 -0.12%
whisper-tiny-decoder 1 409.78 414.39 -1.11%
llama2_7b 1 19.11 19.12 -0.03%
qwen1.5-7b 1 23.42 23.41 0.05%
phi3-3.8b 1 26.55 26.61 -0.22%
mask-rcnn 1 12.07 12.09 -0.11%
llama3-8b 1 21.65 21.66 -0.07%
whisper-large-encoder 1 10.17 10.17 -0.04%
whisper-large-decoder 1 95.79 99.82 -4.03% 🔴
mistral-7b 1 23.63 23.65 -0.06%
FLUX.1-schnell 1 714.14 721.97 -1.08%
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-09-15 00:19:34.712290: 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.
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 306, in main
graph = load_tf_graph(model_name)
File "/src/AMDMIGraphX/tools/accuracy/accuracy_checker.py", line 300, in load_tf_graph
graph_def.ParseFromString(f.read())
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/lib/io/file_io.py", line 116, in read
self._preread_check()
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/lib/io/file_io.py", line 77, in _preread_check
self._read_buf = _pywrap_file_io.BufferedInputStream(
tensorflow.python.framework.errors_impl.UnimplementedError: File system scheme '[local]' not implemented (file: '/new-saved-models/tf-misc/bert_mrpc1.pb')


     ✅ 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: PASSED: MIGraphX meets tolerance

     ✅ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Onnx Operators Adding or modifying an Onnx Operator in the MIGraphX codebase roadmap Tasks to finish for a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants