| 44 | HostExecutor::~HostExecutor() {} |
| 45 | |
| 46 | port::Status HostExecutor::Init(int device_ordinal, |
| 47 | DeviceOptions device_options) { |
| 48 | auto it = |
| 49 | device_options.non_portable_tags.find("host_thread_stack_size_in_bytes"); |
| 50 | if (it != device_options.non_portable_tags.end()) { |
| 51 | if (!absl::SimpleAtoi(it->second, &thread_stack_size_in_bytes_)) { |
| 52 | return port::InvalidArgumentError(absl::StrCat( |
| 53 | "Unable to parse host_thread_stack_size_in_bytes as an integer: ", |
| 54 | it->second)); |
| 55 | } |
| 56 | } |
| 57 | return port::Status::OK(); |
| 58 | } |
| 59 | |
| 60 | DeviceMemoryBase HostExecutor::Allocate(uint64 size, int64 memory_space) { |
| 61 | CHECK_EQ(memory_space, 0); |