*/
typedef struct {
uint32_t total_size; /**< actual size of extended metadata, not 4K-multiplied one */
- uint32_t entry_num; /**< total number of entries (i.e., number of vISA insts) */
+
+ uint32_t node_table_size; /**< size of a node table (node ID to node name) */
+ uint32_t visa_table_size; /**< size of a visa table (visa ID to node ID) */
+
+ uint32_t node_entry_num; /**< total number of node entries */
+ uint32_t visa_entry_num; /**< total number of visa entries (i.e., number of vISA insts) */
+
/**
- * The below shows each entry's data format (little endian).
- * - [ vISA ID : 4Bytes ][ length : 4Bytes ][ data : 'length' Bytes ]
+ * The below shows the data format that 'entry_data' should have (little endian).
+ *
+ * 'entry_data'
+ * - [ node_table : 'node_table_size' Bytes ][ visa_table : 'visa_table_size' Bytes ]
+ *
+ * 'node_table'
+ * - [ node_id : uint32_t ][ length : uint32_t ][ data : 'length' Bytes ]
+ * - if 'data' has a string type, it should be null-terminated and its 'length' includes it.
*
- * If 'data' is string type, it should be null-terminated and its 'length' includes it.
- * Note that when 'length' is zero, the following 'data' is empty.
+ * 'visa_table'
+ * - [ visa_id : uint32_t ][ node_num : uint32_t ][ node_ids : node_num * uint32_t ]
+ * - if 'node_num' is zero, 'node_ids' would be empty.
*/
char entry_data[];
} __attribute__((packed, aligned)) npubin_meta_profile;
#define ENV_PREFIX_SHARE "NE_PREFIX_SHARE"
#define DEFAULT_PREFIX_SHARE "/opt/trinity/share"
#define DEFAULT_PROFILE_PATH "/tmp"
+#define NEED_REVISION (0)
class EmulTask {
public:
void
TrinityEmulAPI::manipulateProfile (EmulTask *task, npu_profile *profile) const
{
+#if NEED_REVISION
std::vector<npu_profile_layer *> profile_layers;
std::unordered_map<std::string, npu_profile_layer *> profile_layer_map;
int dbuf_fd = task->get_extended_dbuf_fd ();
profile->layers = new_layers;
profile->num_layers = num_layers;
}
+#endif
}
int