-
Notifications
You must be signed in to change notification settings - Fork 59
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
[DAPHNE-#768] isNan: elementwise check for NaN elements in a matrix - Draft PR #779
Conversation
Hi @StoeckOverflow, thanks for this pull request! The error message For some background: The catalog file is generated automatically by |
Hi @pdamme, Thank you for your detailed explanation! I have implemented the suggested change by modifying the mnemonic of the DaphneIR operation to ewIsnan in src/ir/daphneir/DaphneOps.td. I am pleased to report that this has resolved the issue. All tests have passed successfully, and the pull request is now ready for review. |
- Renamed the new category of unary ops to "Comparison". - Removed special floating-point values like nan and inf from test cases with integer value types. - Removed comment on missing isNan() from guidelines on porting from Numpy to DaphneLib. - Some more minor changes.
c854d95
to
1464ee5
Compare
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.
Thanks for updating this PR, @StoeckOverflow. Your code looks very good to me. Well done! I applied just a few minor changes, e.g., renaming the new category of elementwise unary operations from "other utilities" to "comparison" (makes more sense and is consistent with the same class of binary ops). Please have a look at the commit I added to see the details.
This PR is ready to be merged. Congrats on your first (*) contribution to the DAPHNE code base! Looking forward to your future contributions.
(*) We will merge your earlier PR #608 later...
This Draft PR introduces the
isNan
function to the Daphne project, enabling element-wise NaN checks on matrices (see issue #768) . The function has been implemented and successfully tested in C++ unit tests.However, there is an issue with invoking the
isNan
function from a Daphne script, which needs to be resolved.Implemented Features
IsNanOp
operation in DaphneIR as a subclass ofEwUnaryOp
(elementwise unary operation) (seesrc/ir/daphneir/DaphneOps.td
).isNan
and documented it (seesrc/parser/daphnedsl/DaphneDSLBuiltins.cpp
anddoc/DaphneDSL/Builtins.md
).isNan
for matrices and scalars and documented it (seesrc/api/python/daphne/operator/nodes/matrix.py
,src/api/python/daphne/operator/nodes/scalar.py
, anddoc/DaphneLib/APIRef.md
).isNan
by extending the existingewUnaryMat
andewUnarySca
kernel with a new op code (seesrc/runtime/local/kernels/EwUnaryMat.h
).Issues
The current implementation works in C++ unit tests but fails when invoked from a Daphne script with the following error:
This is the module_fail.log:
Next Steps and Feedback
I am currently investigating the kernel registration issue and ensuring proper integration. Any insights or suggestions on this matter would be greatly appreciated. Thank you for your time and assistance in reviewing this PR.