// Image component preparation (generated by gen_component.py). func.decl import("prepare") @source_scope(%scope: buffer) -> (i32) func.decl import("prepare") @parameter(%stage: i32, %binding: i32, %input: i32, %source: i32, %policy: buffer) func.decl import("prepare") @memory_forecast(%root: buffer) global.rodata.def @vision_forecast_root = bytes("766973696f6e5f666f7265636173745f6d656d6f7279") global.rodata.def @vision_scope = bytes("766973696f6e") global.rodata.def @vision_policy = bytes("776569676874732e6c6f6f6d") global.rodata.def @vision_name = bytes("696e6b6c696e6732762d70726f6a6563746f72") global.rodata.def @vision_empty = bytes("") func.decl @vision_stage(%height: i64, %width: i64) -> (i32) func.def public @text_image_prepare_v1(%directory: buffer, %options: buffer) -> (i64, i64, i64, i64, buffer, buffer, buffer) { %forecast = global.load @vision_forecast_root : buffer func.call @memory_forecast(%forecast) : (buffer) %h = scalar.constant 1280 : i64 %w = scalar.constant 1280 : i64 %stage = func.call @vision_stage(%h, %w) : (i64, i64) -> (i32) %scope = global.load @vision_scope : buffer %checkpoint = func.call @source_scope(%scope) : (buffer) -> (i32) %policy = global.load @vision_policy : buffer %c0 = scalar.constant 0 : i32 func.call @parameter(%stage, %c0, %c0, %checkpoint, %policy) : (i32, i32, i32, i32, buffer) %units = scalar.constant 1 : i64 %upload = scalar.constant 67174400 : i64 %output = scalar.constant 37748736 : i64 %state_bytes = index.constant 1 : offset %state = buffer.alloca align(1) %state_bytes : buffer %empty = global.load @vision_empty : buffer %name = global.load @vision_name : buffer func.return %units, %upload, %output, %output, %empty, %name, %state : i64, i64, i64, i64, buffer, buffer, buffer }