*/
#include "NPUdrvAPI.h"
+#include <bits/stdint-uintn.h>
#include <string.h>
#include <assert.h>
#include <atomic>
delete[] segt;
} else {
std::string cmd_path (prefix_share_);
- if (NPU_VERSION_MINOR (elem_model->getNpuVersion ()) == 3) {
- if (elem_model->getNpuTops () == 2)
- cmd_path += "/mRPsim/triv-3.9.1_2tops.cmd";
- else
- cmd_path += "/mRPsim/triv-3.9.1.cmd";
- } else if (NPU_VERSION_MINOR (elem_model->getNpuVersion ()) == 4) {
- cmd_path += "/mRPsim/triv24-latest.cmd";
- } else {
- logerr (TAG, "Invalid model version: minor(%d)(%d)\n", model->version,
- NPU_VERSION_MINOR (model->version));
- delete[] segt;
- delete req;
- return -EINVAL;
- }
+ cmd_path += "/mRPsim/triv-";
+
+ uint64_t version = elem_model->getNpuVersion ();
+ uint64_t major = NPU_VERSION_MAJOR (version);
+ uint64_t minor = NPU_VERSION_MINOR (version);
+ uint64_t extra = NPU_VERSION_EXTRA (version);
+ uint64_t tops = NPU_VERSION_TOPS (version);
+
+ cmd_path +=
+ std::to_string (major) + "." + std::to_string (minor) + "." + std::to_string (extra);
+
+ if (minor == 3 && tops == 2)
+ cmd_path += "_2tops";
+
+ cmd_path += ".cmd";
std::string prof_path (prefix_profile_);
prof_path += "/ne_profile_" + std::to_string (getpid ());
+ loginfo (TAG, "cmd_path: %s, prof_path: %s", cmd_path.c_str (), prof_path.c_str ());
+
if (createDirectory (prof_path)) {
prof_path += "/req_id_" + std::to_string (req_id);
status = req->run_emul (prog, segt, static_cast<char *> (elem_metadata->getAddr ()),