migraphx-benchmark / AMDMIGraphX

AMD's graph optimization engine.
https://rocmsoftwareplatform.github.io/AMDMIGraphX/doc/html/
MIT License
0 stars 1 forks source link

Hugging Face models #146

Closed music-dino closed 8 months ago

music-dino commented 8 months ago

All models except jonatasgrosman/wav2vec2-large-xlsr-53-english fail with: normalize_compute_shape: CONVOLUTION: mismatched channel numbers during parsing.

music-dino commented 8 months ago

jonatasgrosman/wav2vec2-large-xlsr-53-english

Fails during compilation with: terminate called after throwing an instance of 'std::bad_alloc' terminate called recursively terminate called recursively terminate called recursively Aborted (core dumped)

music-dino commented 8 months ago

runwayml/stable-diffusion-v1-5, stabilityai/stable-diffusion-xl-base-1.0, stabilityai/stable-diffusion-2-1

The text encoders for these models successfully compile.

unet, vae_encoder, vae_decoder models fail with normalize_compute_shape: CONVOLUTION: mismatched channel numbers during parsing.

gyulaz-htec commented 8 months ago

jonatasgrosman/wav2vec2-large-xlsr-53-english

Fails during compilation with: terminate called after throwing an instance of 'std::bad_alloc' terminate called recursively terminate called recursively terminate called recursively Aborted (core dumped)

The fail is caused by the default input dimension being to large in the onnx model. Setting the proper input dimension fixes the issue: ./build/bin/migraphx-driver compile ./optimum_models/wav2vec/model.onnx --input-dim @input_values 1 1000

music-dino commented 8 months ago

runwayml/stable-diffusion-v1-5, stabilityai/stable-diffusion-xl-base-1.0, stabilityai/stable-diffusion-2-1

The text encoders for these models successfully compile.

unet, vae_encoder, vae_decoder models fail with normalize_compute_shape: CONVOLUTION: mismatched channel numbers during parsing.

runwayml/stable-diffusion-v1-5

The models successfully compile with the following commands: migraphx-driver compile sd_v1-5/vae_decoder/model.onnx --input-dim @latent_sample 2 4 64 64 --gpu migraphx-driver compile sd_v1-5/vae_encoder/model.onnx --input-dim @sample 2 3 512 512 --gpu migraphx-driver compile sd_v1-5/unet/model.onnx --input-dim @sample 2 4 64 64 @timestep 1 @encoder_hidden_states 2 320 768 --fp16

music-dino commented 8 months ago

runwayml/stable-diffusion-v1-5, stabilityai/stable-diffusion-xl-base-1.0, stabilityai/stable-diffusion-2-1

The text encoders for these models successfully compile.

unet, vae_encoder, vae_decoder models fail with normalize_compute_shape: CONVOLUTION: mismatched channel numbers during parsing.

stabilityai/stable-diffusion-xl-base-1.0

The models successfully compile with the following commands: migraphx-driver compile sd_xl/vae_decoder/model.onnx --input-dim @latent_sample 2 4 64 64 --gpu migraphx-driver compile sd_xl/vae_encoder/model.onnx --input-dim @sample 2 3 512 512 --gpu migraphx-driver compile sd_xl/unet/model.onnx --input-dim @sample 2 4 64 64 @timestep 1 @encoder_hidden_states 2 640 2048 --fp16

music-dino commented 8 months ago

runwayml/stable-diffusion-v1-5, stabilityai/stable-diffusion-xl-base-1.0, stabilityai/stable-diffusion-2-1

The text encoders for these models successfully compile.

unet, vae_encoder, vae_decoder models fail with normalize_compute_shape: CONVOLUTION: mismatched channel numbers during parsing.

stabilityai/stable-diffusion-2-1

The models successfully compile with the following commands: migraphx-driver compile sd_2-1/vae_decoder/model.onnx --input-dim @latent_sample 2 4 64 64 --gpu migraphx-driver compile sd_2-1/vae_encoder/model.onnx --input-dim @sample 2 3 512 512 --gpu migraphx-driver compile sd_2-1/unet/model.onnx --input-dim @sample 2 4 64 64 @timestep 1 @encoder_hidden_states 2 64 1024 --fp16

music-dino commented 8 months ago

All models except jonatasgrosman/wav2vec2-large-xlsr-53-english fail with: normalize_compute_shape: CONVOLUTION: mismatched channel numbers during parsing.

microsoft/layoutlmv3-base

The model successfully compiles with the following command: migraphx-driver compile lmv3/model.onnx --input-dim @input_ids batch_size sequence_length @bbox batch_size sequence_length 4 @attention_mask batch_size sequence_length @pixel_values batch_size 3 224 224

Where batch_size and sequence_length can vary.

music-dino commented 8 months ago
  • openai/clip-vit-large-patch14

openai/clip-vit-large-patch14

The model successfully compiles with the following command: driver compile vit/model.onnx --input-dim @input_ids 4 32 @pixel_values 1 3 224 224 @attention_mask 4 32