Skip to content

auto offloading in dynamic shape IR#1313

Open
Yancey0623 wants to merge 4 commits into
mainfrom
dynamic_offloading
Open

auto offloading in dynamic shape IR#1313
Yancey0623 wants to merge 4 commits into
mainfrom
dynamic_offloading

Conversation

@Yancey0623

Copy link
Copy Markdown
Collaborator

No description provided.

disc_ral::createDiscSpecializeFusionWithSpeculationPass(
gpu_options.sm_count, gpu_options.max_threads_per_sm));
// pm.addNestedPass<FuncOp>(
// disc_ral::createDiscSpecializeFusionWithSpeculationPass(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any problems with it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just easier to analysis buffer living range, will remove this comment.

if (main.getName() == SymbolicDimMgr::getShapeConstraintGraphFunctionName())
return;
mlir::OpBuilder b(main);
const int64_t memoryLimitation = 21474836480; // 30GB

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's 20GB...

}
return result;
}
void SortBuffersByPrioriy(std::vector<LivingBuffer>& livingBuffers) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to consider buffer size here, even with symbolic shape?

return offloadCond;
}
std::vector<LivingBuffer> FilterBuffers(
std::vector<LivingBuffer> livingBuffers) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: reference ..

<< " expr: " << memoryUsageList[instIndex] << "\n";
return memoryUsageList[instIndex];
}
std::vector<int64_t> ConcretMemoryUsageSimulator(int64_t concretValue) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this function for?

offloadIfOp.getElseRegion().front().clear();
b.setInsertionPointToStart(&offloadIfOp.getElseRegion().front());
auto dummyHostBuffer = cloneBuffer(b, endOp->getLoc(), buffer);
dummyHostBuffer.getDefiningOp()->setAttr(kRematBufferAttr,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this dummy host buffer cause some unexpected behavior .... if it's used somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants