Skip to content

Commit 26dea30

Browse files
committed
Remove dependencies on umpire
1 parent d524e2e commit 26dea30

File tree

4 files changed

+0
-60
lines changed

4 files changed

+0
-60
lines changed

tests/AMSlib/ams_interface/ams_ete.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#include <cstdlib>
99
#include <cstring>
1010
#include <limits>
11-
#include <umpire/Umpire.hpp>
12-
#include <umpire/strategy/QuickPool.hpp>
1311
#include <wf/basedb.hpp>
1412
#include <wf/resource_manager.hpp>
1513

@@ -19,14 +17,6 @@
1917

2018
using namespace ams;
2119

22-
void createUmpirePool(std::string parent_name, std::string pool_name)
23-
{
24-
auto &rm = umpire::ResourceManager::getInstance();
25-
auto alloc_resource = rm.makeAllocator<umpire::strategy::QuickPool, true>(
26-
pool_name, rm.getAllocator(parent_name));
27-
}
28-
29-
3020
AMSDType getDataType(char *d_type)
3121
{
3222
AMSDType dType = AMSDType::AMS_DOUBLE;
@@ -75,8 +65,6 @@ struct Problem {
7565
int iterations,
7666
int num_elements)
7767
{
78-
auto &rm = umpire::ResourceManager::getInstance();
79-
8068
for (int i = 0; i < iterations; i++) {
8169
int elements = num_elements; // * ((DType)(rand()) / RAND_MAX) + 1;
8270
SmallVector<AMSTensor> input_tensors;
@@ -184,9 +172,6 @@ int main(int argc, char **argv)
184172
uq_policy == AMSUQPolicy::AMS_RANDOM) &&
185173
"Test only supports duq models");
186174

187-
createUmpirePool("HOST", "TEST_HOST");
188-
AMSSetAllocator(AMSResourceType::AMS_HOST, "TEST_HOST");
189-
190175
AMSCAbstrModel model_descr = AMSRegisterAbstractModel(
191176
"test", uq_policy, threshold, model_path, "test");
192177

tests/AMSlib/ams_interface/ams_ete_env.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,13 @@
66
#include <cassert>
77
#include <cstdlib>
88
#include <cstring>
9-
#include <umpire/Umpire.hpp>
10-
#include <umpire/strategy/QuickPool.hpp>
119
#include <wf/basedb.hpp>
1210
#include <wf/resource_manager.hpp>
1311

1412
#include "AMS.h"
1513

1614
using namespace ams;
1715

18-
void createUmpirePool(std::string parent_name, std::string pool_name)
19-
{
20-
auto &rm = umpire::ResourceManager::getInstance();
21-
auto alloc_resource = rm.makeAllocator<umpire::strategy::QuickPool, true>(
22-
pool_name, rm.getAllocator(parent_name));
23-
}
24-
25-
2616
AMSDType getDataType(char *d_type)
2717
{
2818
AMSDType dType = AMSDType::AMS_DOUBLE;
@@ -71,8 +61,6 @@ struct Problem {
7161
int iterations,
7262
int num_elements)
7363
{
74-
auto &rm = umpire::ResourceManager::getInstance();
75-
7664
for (int i = 0; i < iterations; i++) {
7765
int elements = num_elements; // * ((DType)(rand()) / RAND_MAX) + 1;
7866
SmallVector<AMSTensor> input_tensors;
@@ -185,10 +173,6 @@ int main(int argc, char **argv)
185173
AMSResourceType resource = AMSResourceType::AMS_HOST;
186174
srand(time(NULL));
187175

188-
189-
createUmpirePool("HOST", "TEST_HOST");
190-
AMSSetAllocator(AMSResourceType::AMS_HOST, "TEST_HOST");
191-
192176
AMSCAbstrModel models[] = {AMSQueryModel(model1), AMSQueryModel(model2)};
193177

194178
for (int i = 0; i < 2; i++) {

tests/AMSlib/ams_interface/ams_multi_model_ete.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,12 @@
88
#include <cstring>
99
#include <limits>
1010
#include <ml/uq.hpp>
11-
#include <umpire/Umpire.hpp>
12-
#include <umpire/strategy/QuickPool.hpp>
1311
#include <wf/basedb.hpp>
1412
#include <wf/resource_manager.hpp>
1513

1614
#include "AMS.h"
1715
#include "wf/debug.h"
1816

19-
void createUmpirePool(std::string parent_name, std::string pool_name)
20-
{
21-
auto &rm = umpire::ResourceManager::getInstance();
22-
auto alloc_resource = rm.makeAllocator<umpire::strategy::QuickPool, true>(
23-
pool_name, rm.getAllocator(parent_name));
24-
}
25-
26-
2717
AMSDType getDataType(char *d_type)
2818
{
2919
AMSDType dType = AMSDType::AMS_DOUBLE;
@@ -72,8 +62,6 @@ struct Problem {
7262
int iterations,
7363
int num_elements)
7464
{
75-
auto &rm = umpire::ResourceManager::getInstance();
76-
7765
for (int i = 0; i < iterations; i++) {
7866
int elements = num_elements; // * ((DType)(rand()) / RAND_MAX) + 1;
7967
std::vector<const DType *> inputs;
@@ -168,9 +156,6 @@ int main(int argc, char **argv)
168156
uq_policy == AMSUQPolicy::AMS_RANDOM) &&
169157
"Test only supports duq models");
170158

171-
createUmpirePool("HOST", "TEST_HOST");
172-
AMSSetAllocator(AMSResourceType::AMS_HOST, "TEST_HOST");
173-
174159
AMSCAbstrModel model_descr_1 = AMSRegisterAbstractModel(
175160
"test_1", uq_policy, threshold, model_path_1, nullptr, "test_1", -1);
176161

tests/AMSlib/ams_interface/ams_rmq_env.cpp

-14
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,12 @@
88
#include <cstring>
99
#include <limits>
1010
#include <ml/uq.hpp>
11-
#include <umpire/Umpire.hpp>
12-
#include <umpire/strategy/QuickPool.hpp>
1311
#include <wf/basedb.hpp>
1412
#include <wf/resource_manager.hpp>
1513

1614
#include "AMS.h"
1715
#include "wf/debug.h"
1816

19-
void createUmpirePool(std::string parent_name, std::string pool_name)
20-
{
21-
auto &rm = umpire::ResourceManager::getInstance();
22-
auto alloc_resource = rm.makeAllocator<umpire::strategy::QuickPool, true>(
23-
pool_name, rm.getAllocator(parent_name));
24-
}
25-
2617

2718
AMSDType getDataType(char *d_type)
2819
{
@@ -71,8 +62,6 @@ struct Problem {
7162
int iterations,
7263
int num_elements)
7364
{
74-
auto &rm = umpire::ResourceManager::getInstance();
75-
7665
for (int i = 0; i < iterations; i++) {
7766
int elements = num_elements; // * ((DType)(rand()) / RAND_MAX) + 1;
7867
std::vector<const DType *> inputs;
@@ -169,9 +158,6 @@ int main(int argc, char **argv)
169158
// dbType = AMSDBType::AMS_RMQ;
170159
// }
171160

172-
createUmpirePool("HOST", "TEST_HOST");
173-
AMSSetAllocator(AMSResourceType::AMS_HOST, "TEST_HOST");
174-
175161
AMSCAbstrModel ams_model = AMSRegisterAbstractModel("rmq_db_no_model",
176162
AMSUQPolicy::AMS_RANDOM,
177163
0.5,

0 commit comments

Comments
 (0)