-
Notifications
You must be signed in to change notification settings - Fork 609
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
New warp example #1158
New warp example #1158
Conversation
const OpSpec &Spec() const { return this->spec_; } | ||
|
||
private: | ||
/// @defgroup WarpStaticType Dynamic to static type routing |
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.
Please adjust comments from ///
-> /* */
.
|
||
protected: | ||
inline cudaStream_t GetStream() const { | ||
return ws_ && ws_->has_stream() ? ws_->stream() : 0; |
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.
You can use #1178
docs/examples/warp_gpu.ipynb
Outdated
@@ -0,0 +1,164 @@ | |||
{ |
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.
If you want to make it a part of our example set please add more description why certain things are done.
7b72325
to
e652a13
Compare
!build |
CI MESSAGE: [964451]: BUILD STARTED |
* matrix as GPU argument (GPU variant) and as named input (CPU variant) * different interpolation and border handling. * add `concat_str` as a shortcut for `make_string_delim("", ...) * minor fixes related to CPU ArgumentInputs Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
e652a13
to
65946b9
Compare
!build |
CI MESSAGE: [964461]: BUILD STARTED |
CI MESSAGE: [964461]: BUILD PASSED |
docs/examples/warp.ipynb
Outdated
"db_folder = os.path.join(test_data_root, 'db', 'lmdb')\n", | ||
"\n", | ||
"def gen_transform(angle, zoom, dst_cx, dst_cy, src_cx, src_cy):\n", | ||
" t1 = np.array([[1, 0, -dst_cx], [0, 1, -dst_cy], [0, 0, 1]])\n", |
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.
Please reformat this matrices to make them more readable.
docs/examples/warp.ipynb
Outdated
" t2 = np.array([[1, 0, src_cx], [0, 1, src_cy], [0, 0, 1]])\n", | ||
" return (np.matmul(t2, np.matmul(r, t1)))[0:2,0:3]\n", | ||
"\n", | ||
"def gen_transforms(n, step):\n", |
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.
gen_transforms and gen_transform sounds very alike.
docs/examples/warp.ipynb
Outdated
@@ -0,0 +1,172 @@ | |||
{ |
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.
Please add more narrative with the detailed description of what is happening here. Now it is not something we can call a tutorial.
You can also show how to achieve things that were not possible earlier, like Shear or Translate operator.
Also please add this notebook to our docs (update appropriate *.rst inside docs folder to include this file).
* Chance make_string to use empty delimiter by default. * Add `operator<<(ostream &, const TensorLayout&)` Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
!build |
CI MESSAGE: [965949]: BUILD STARTED |
CI MESSAGE: [965949]: BUILD PASSED |
I'd like to request a change to make the example better. Here's the list of things in my opinion are lacking:
Lastly, whole point of notebook is to use snippets + markdown descriptions. So I'd move in-code comments to the descriptions. |
0e32214
to
60105c7
Compare
60105c7
to
13fa4ce
Compare
!build |
CI MESSAGE: [967690]: BUILD STARTED |
13fa4ce
to
5d57662
Compare
!build |
5d57662
to
29c1c55
Compare
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
29c1c55
to
fd45232
Compare
CI MESSAGE: [967754]: BUILD STARTED |
CI MESSAGE: [967754]: BUILD PASSED |
Why we need this PR?
Pick one
What happened in this PR?
concat_str
to join values into one string without delimitersJIRA TASK: [DALI-1010]