1// Copyright 2022 The TensorFlow Authors. All Rights Reserved. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15include "tensorflow/lite/delegates/gpu/common/gpu_model.fbs"; 16include "tensorflow/lite/delegates/gpu/common/task/serialization_base.fbs"; 17 18namespace tflite.gpu.metal.data; 19 20table MetalProgram { 21 define_names:[string]; 22 define_expressions:[string]; 23 code:string; 24} 25 26table InferenceContext { 27 gpu_model:tflite.gpu.data.GpuModel; 28 // Must be serialized after actual Metal objects created 29 // Separated from nodes in GpuModel 30 tuned_work_group_sizes_per_node:[tflite.gpu.data.Int3]; 31 metal_programs:[MetalProgram]; 32} 33 34root_type InferenceContext; 35