Skip to content

Adding cat, full, permute_copy and relu ops#34

Merged
dijopaul merged 3 commits intomainfrom
nishak_cat_relu_full_permute
Nov 18, 2024
Merged

Adding cat, full, permute_copy and relu ops#34
dijopaul merged 3 commits intomainfrom
nishak_cat_relu_full_permute

Conversation

@nishpoonia
Copy link
Collaborator

Adding cat, full, permute_copy and relu ops

kernels:
- arg_meta: null
kernel_name: torch::executor::full_out
kernel_name: impl::HiFi::full_out
Copy link
Owner

Choose a reason for hiding this comment

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

use name space cadence::impl::HiFi::

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

kernels:
- arg_meta: null
kernel_name: torch::executor::permute_copy_out
kernel_name: impl::HiFi::permute_copy_out
Copy link
Owner

Choose a reason for hiding this comment

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

use name space cadence::impl::HiFi::

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done


constexpr auto name = "full.out";

bool optimized = 0;
Copy link
Owner

Choose a reason for hiding this comment

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

Use bool as true false

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done


bool optimized = false;

if (out.scalar_type() == ScalarType::Float)
Copy link
Owner

Choose a reason for hiding this comment

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

Can we use OR (||) here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

num_out_dims,
num_inp_dims);

return out;
Copy link
Owner

Choose a reason for hiding this comment

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

why we need return here I think there is return common to all if else

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed

(int)255,
input.numel());
ret_val = 5;

Copy link
Owner

Choose a reason for hiding this comment

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

ret_val = 5; ??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed

@dijopaul dijopaul merged commit d730ed8 into main Nov 18, 2024
dijopaul added a commit that referenced this pull request Nov 28, 2024
* Adding cat, full, permute_copy and relu ops (#34)

* Adding cat, full, permute_copy

* updating relu wrt new ref (#36)

* Temporary memory allocation, replacing mallocs (#38)

* Integrated temporary mem alloc functionality in place of malloc

* Namespace related changes

* Cleanup the main application

* Adding atan2, softmax, clamp and remainder ops (#37)

* Replaced malloc with temp_memory_allocator

---------

Co-authored-by: nishpoonia <94543206+nishpoonia@users.noreply.github.com>
Co-authored-by: Rushi-cad <gherderu@cadence.com>
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