-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
auto offloading in dynamic shape IR #1313
base: main
Are you sure you want to change the base?
Conversation
disc_ral::createDiscSpecializeFusionWithSpeculationPass( | ||
gpu_options.sm_count, gpu_options.max_threads_per_sm)); | ||
// pm.addNestedPass<FuncOp>( | ||
// disc_ral::createDiscSpecializeFusionWithSpeculationPass( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any problems with it?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
No description provided.