Skip to content

Yohann/support-int-types#187

Open
YohannDudouit wants to merge 3 commits intodevelopfrom
yohann/support-int-types
Open

Yohann/support-int-types#187
YohannDudouit wants to merge 3 commits intodevelopfrom
yohann/support-int-types

Conversation

@YohannDudouit
Copy link
Copy Markdown
Collaborator

Add support for int32_t and int64_t as "scalar" types for AMSTensor.
Also fix an unrelated minor bug in eos_ams, where the density was used twice instead of the energy.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Cpp-linter Review

Used clang-format v18.1.8

Click here for the full clang-format patch
diff --git a/src/AMSlib/AMSTensor.cpp b/src/AMSlib/AMSTensor.cpp
index 8362f41..45a41e2 100644
--- a/src/AMSlib/AMSTensor.cpp
+++ b/src/AMSlib/AMSTensor.cpp
@@ -36 +36,2 @@ bool AMSTensor::isContiguous(AMSTensor::IntDimType expected_stride) const
-namespace {
+namespace
+{
@@ -53 +54 @@ constexpr AMSDType scalar_to_ams_dtype()
-}
+}  // namespace
diff --git a/src/AMSlib/wf/interface.cpp b/src/AMSlib/wf/interface.cpp
index b413f26..07a6611 100644
--- a/src/AMSlib/wf/interface.cpp
+++ b/src/AMSlib/wf/interface.cpp
@@ -105 +105,2 @@ static ams::SmallVector<ams::AMSTensor> torchToAMSTensors(
-      throw std::runtime_error("torchToAMSTensors: unsupported tensor scalar type");
+      throw std::runtime_error(
+          "torchToAMSTensors: unsupported tensor scalar type");

Have any feedback or feature suggestions? Share it here.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

1 participant