Skip to content

Commit

Permalink
Nit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
koparasy committed Dec 26, 2024
1 parent d7b0c2b commit 5d0c960
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
22 changes: 4 additions & 18 deletions src/AMSlib/AMS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,28 +673,14 @@ void AMSConfigureFSDatabase(AMSDBType db_type, const char *db_path)

#ifdef __ENABLE_MPI__
AMSExecutor AMSCreateDistributedExecutor(AMSCAbstrModel model,
AMSDType data_type,
AMSResourceType resource_type,
AMSPhysicFn call_back,
MPI_Comm Comm,
int process_id,
int world_size)

{
if (data_type == AMSDType::AMS_DOUBLE) {
auto *dWF = _AMSCreateExecutor<double>(
model, data_type, resource_type, call_back, process_id, world_size);
dWF->set_communicator(Comm);
return _AMSRegisterExecutor(data_type, dWF);

} else if (data_type == AMSDType::AMS_SINGLE) {
auto *sWF = _AMSCreateExecutor<float>(
model, data_type, resource_type, call_back, process_id, world_size);
sWF->set_communicator(Comm);
return _AMSRegisterExecutor(data_type, sWF);
} else {
throw std::invalid_argument("Data type is not supported by AMSLib!");
return static_cast<AMSExecutor>(-1);
}
auto *dWF = _AMSCreateExecutor(model, process_id, world_size);
dWF->set_communicator(Comm);
return _AMSRegisterExecutor(dWF);
}
#endif
} // namespace ams
1 change: 0 additions & 1 deletion src/AMSlib/AMSTensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ AMSTensor::AMSTensor(uint8_t* data,
_location(location),
_owned(!view)
{
#warning add a check to verify that user provided data are contiguous
_bytes = _elements * _element_size;
_elements = computeNumElements(shapes);
if (!_data) {
Expand Down
1 change: 0 additions & 1 deletion tests/AMSlib/ams_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
function(ADD_API_UNIT_TEST gname name cmd)
message(WARNING "ARGS are ${cmd}")
add_test(NAME ${name} COMMAND bash -c "${cmd}")
set_tests_properties(${name} PROPERTIES LABELS ${gname})
endfunction()
Expand Down

0 comments on commit 5d0c960

Please sign in to comment.