text
stringlengths 0
2.2M
|
---|
orig_bailout_node->kind() == prim::Guard) &&
|
bailout_index == orig_bailout_node->i(attr::index));
|
BailOutGraphBuilderForNode bg(orig, target);
|
auto bailout_graph = bg.buildBailOutGraphFrom(orig_bailout_node);
|
removeBailouts(bailout_graph->block());
|
ClearProfilingInformation(bailout_graph);
|
GRAPH_DUMP("bailout_graph ", bailout_graph);
|
return bailout_graph;
|
}
|
} // namespace jit
|
} // namespace torch
|
/*
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
*
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
* you may not use this file except in compliance with the License.
|
* You may obtain a copy of the License at
|
*
|
* http://www.apache.org/licenses/LICENSE-2.0
|
*
|
* Unless required by applicable law or agreed to in writing, software
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* See the License for the specific language governing permissions and
|
* limitations under the License.
|
*/
|
#include <folly/io/async/test/ZeroCopy.h>
|
namespace folly {
|
// ZeroCopyTest
|
ZeroCopyTest::ZeroCopyTest(
|
size_t numClients, int numLoops, bool zeroCopy, size_t bufferSize)
|
: numClients_(numClients),
|
counter_(numClients),
|
numLoops_(numLoops),
|
zeroCopy_(zeroCopy),
|
bufferSize_(bufferSize),
|
listenSock_(new folly::AsyncServerSocket(&evb_)),
|
server_(&evb_, numLoops_, bufferSize_, zeroCopy) {
|
clients_.reserve(numClients_);
|
for (size_t i = 0; i < numClients_; i++) {
|
clients_.emplace_back(std::make_unique<ZeroCopyTestAsyncSocket>(
|
&counter_, &evb_, numLoops_, bufferSize_, zeroCopy));
|
}
|
if (listenSock_) {
|
server_.addCallbackToServerSocket(*listenSock_);
|
}
|
}
|
bool ZeroCopyTest::run() {
|
evb_.runInEventBaseThread([this]() {
|
if (listenSock_) {
|
listenSock_->bind(0);
|
listenSock_->setZeroCopy(zeroCopy_);
|
listenSock_->listen(10);
|
listenSock_->startAccepting();
|
connectAll();
|
}
|
});
|
evb_.loopForever();
|
for (auto& client : clients_) {
|
if (client->isZeroCopyWriteInProgress()) {
|
return false;
|
}
|
}
|
return true;
|
}
|
} // namespace folly
|
//===- llvm/ADT/SmallVector.cpp - 'Normally small' vectors ----------------===//
|
//
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
// See https://llvm.org/LICENSE.txt for license information.
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
//
|
//===----------------------------------------------------------------------===//
|
//
|
// This file implements the SmallVector class.
|
//
|
//===----------------------------------------------------------------------===//
|
// ATen: modified from llvm::SmallVector.
|
// replaced llvm::safe_malloc with std::bad_alloc
|
// deleted LLVM_ENABLE_EXCEPTIONS
|
#include <c10/util/SmallVector.h>
|
#include <cstdint>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.