Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
6bb59e94
Commit
6bb59e94
authored
Sep 03, 2024
by
zhuwenwen
Browse files
fix build error
parent
af7f4372
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
csrc/core/scalar_type.hpp
csrc/core/scalar_type.hpp
+5
-5
setup.py
setup.py
+1
-1
No files found.
csrc/core/scalar_type.hpp
View file @
6bb59e94
...
@@ -387,10 +387,10 @@ class ScalarTypeTorch : public torch::CustomClassHolder, public ScalarType {
...
@@ -387,10 +387,10 @@ class ScalarTypeTorch : public torch::CustomClassHolder, public ScalarType {
// This needs to be implemented and throw a TypeError in order for
// This needs to be implemented and throw a TypeError in order for
// PyTorch's opcheck to work on ops that use ScalarTypes.
// PyTorch's opcheck to work on ops that use ScalarTypes.
int64_t
len
()
const
{
//
int64_t len() const {
throw
c10
::
TypeError
(
"__len__ not implemented"
);
//
throw c10::TypeError("__len__ not implemented");
return
0
;
//
return 0;
}
//
}
// Serialize a ScalarType into a tuple of pairs. Where each pair
// Serialize a ScalarType into a tuple of pairs. Where each pair
// is a (fieldname, value).
// is a (fieldname, value).
...
@@ -483,7 +483,7 @@ class ScalarTypeTorch : public torch::CustomClassHolder, public ScalarType {
...
@@ -483,7 +483,7 @@ class ScalarTypeTorch : public torch::CustomClassHolder, public ScalarType {
self
.
get
()
->
min
());
self
.
get
()
->
min
());
});
});
bind_function
(
cls
,
"__len__"
,
&
ScalarTypeTorch
::
len
);
//
bind_function(cls, "__len__", &ScalarTypeTorch::len);
bind_function
(
cls
,
"__str__"
,
&
Base
::
str
);
bind_function
(
cls
,
"__str__"
,
&
Base
::
str
);
bind_function
(
cls
,
"__eq__"
,
[](
SelfPtr
const
&
self
,
SelfPtr
const
&
other
)
{
bind_function
(
cls
,
"__eq__"
,
[](
SelfPtr
const
&
self
,
SelfPtr
const
&
other
)
{
return
*
self
==
*
other
;
return
*
self
==
*
other
;
...
...
setup.py
View file @
6bb59e94
...
@@ -409,7 +409,7 @@ try:
...
@@ -409,7 +409,7 @@ try:
import vllm.commit_id
import vllm.commit_id
__commit__ = vllm.commit_id.__commit__
__commit__ = vllm.commit_id.__commit__
except Exception as e:
except Exception as e:
warnings.warn(f"Failed to read commit hash:
\
n
{
e
}
",
warnings.warn(f"Failed to read commit hash:
\
\
n + str(e)
",
RuntimeWarning,
RuntimeWarning,
stacklevel=2)
stacklevel=2)
__commit__ = "COMMIT_HASH_PLACEHOLDER"
__commit__ = "COMMIT_HASH_PLACEHOLDER"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment