-
Notifications
You must be signed in to change notification settings - Fork 1.4k
refactor(cudf): Improve debug printing for cudf #15831
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
base: main
Are you sure you want to change the base?
refactor(cudf): Improve debug printing for cudf #15831
Conversation
✅ Deploy Preview for meta-velox canceled.
|
| const std::shared_ptr<velox::exec::Expr>& expr, | ||
| int indent = 0) { | ||
| std::cout << std::string(indent, ' ') << expr->name() << std::endl; | ||
| std::cout << std::string(indent, ' ') << expr->name() << "(" |
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.
Why not use this with default argument recursive = true
/// @param recursive If true, the output includes input expressions and all
/// their inputs recursively.
virtual std::string toString(bool recursive = true) const;
| << oper->toString().c_str() | ||
| << ", keepOperator = " << keepOperator | ||
| << ", replaceOp.size() = " << replaceOp.size() << "\n"; | ||
| << ", replaceOp.size() = " << replaceOp.size() << ", "; |
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.
Why the line ends with , ?
| } else if (!condition) { | ||
| LOG(WARNING) | ||
| << "Replacement with cuDF operator failed. Falling back to CPU execution"; | ||
| LOG(WARNING) << "Replacement Failed Operator: " << oper->toString() |
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.
No need to add << std::endl in the end, LOG(WARNING) logs a line
| } | ||
| } else { | ||
| if (CudfConfig::getInstance().debugEnabled) { | ||
| LOG(INFO) << cudf::ast::expression_to_string(cudfTree_.back()) |
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.
ditto
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| /* |
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.
Remove some duplicated license declaration
| @@ -0,0 +1,475 @@ | |||
| /* | |||
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.
Do we have the specification for the file name? I notice some is .hpp while Velox is always .h, and some is .cu
| /** | ||
| * @brief Get the string representation of a cudf::type_id | ||
| */ | ||
| inline std::string type_id_to_string(cudf::type_id id) { |
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.
Does the file copy from somewhere? If yes, please add the link and describe why you need to copy it instead linking it
The debug prints during execution of cudf driver adapter is improved in this PR