2016-07-21 12:41:26 -04:00
|
|
|
//
|
|
|
|
|
// Copyright (c) 2009 Advanced Micro Devices, Inc. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef WITHOUT_HSA_BACKEND
|
|
|
|
|
|
|
|
|
|
#include "top.hpp"
|
|
|
|
|
#include "device/device.hpp"
|
|
|
|
|
#include "device/appprofile.hpp"
|
|
|
|
|
#include "device/rocm/rocappprofile.hpp"
|
|
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
amd::AppProfile* rocCreateAppProfile() {
|
|
|
|
|
amd::AppProfile* appProfile = new roc::AppProfile;
|
2016-07-21 12:41:26 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
if ((appProfile == nullptr) || !appProfile->init()) {
|
|
|
|
|
return nullptr;
|
|
|
|
|
}
|
2016-07-21 12:41:26 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
return appProfile;
|
2016-07-21 12:41:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace roc {
|
|
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
bool AppProfile::ParseApplicationProfile() {
|
|
|
|
|
std::string appName("Explorer");
|
2016-07-21 12:41:26 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
std::transform(appName.begin(), appName.end(), appName.begin(), ::tolower);
|
|
|
|
|
std::transform(appFileName_.begin(), appFileName_.end(), appFileName_.begin(), ::tolower);
|
2016-07-21 12:41:26 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
if (appFileName_.compare(appName) == 0) {
|
|
|
|
|
gpuvmHighAddr_ = false;
|
|
|
|
|
profileOverridesAllSettings_ = true;
|
|
|
|
|
}
|
2016-07-21 12:41:26 -04:00
|
|
|
|
2017-04-13 13:56:38 -04:00
|
|
|
return true;
|
2016-07-21 12:41:26 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|