Skip to content

Commit

Permalink
Remove single-node graph optimization (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
jstoecker authored Jan 4, 2021
1 parent 2d3cda2 commit 6fed953
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions Libraries/DirectMLX.h
Original file line number Diff line number Diff line change
Expand Up @@ -626,17 +626,6 @@ namespace dml
{
detail::GraphDesc graph = m_graphBuilder->GetGraphDesc(outputs);

// If there's only a single node, don't bother creating a graph - just compile the operator directly.
if (graph.nodes.size() == 1)
{
IDMLDevice* device = m_graphBuilder->GetDevice();

Microsoft::WRL::ComPtr<IDMLCompiledOperator> compiledOp;
DMLX_THROW_IF_FAILED(device->CompileOperator(graph.nodes[0].Operator, flags, IID_PPV_ARGS(&compiledOp)));

return compiledOp;
}

std::vector<DML_GRAPH_NODE_DESC> graphNodes(graph.nodes.size());
for (size_t i = 0; i < graphNodes.size(); ++i)
{
Expand Down

0 comments on commit 6fed953

Please sign in to comment.