Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
e0da01ea
Unverified
Commit
e0da01ea
authored
Nov 08, 2022
by
xcnick
Committed by
GitHub
Nov 08, 2022
Browse files
[hotfix] fix build error when torch version >= 1.13 (#1803)
parent
f5a92c28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
colossalai/kernel/cuda_native/csrc/multihead_attention_1d.cpp
...ssalai/kernel/cuda_native/csrc/multihead_attention_1d.cpp
+5
-0
colossalai/kernel/cuda_native/csrc/multihead_attention_1d.h
colossalai/kernel/cuda_native/csrc/multihead_attention_1d.h
+7
-1
No files found.
colossalai/kernel/cuda_native/csrc/multihead_attention_1d.cpp
View file @
e0da01ea
...
...
@@ -2,8 +2,13 @@
#include <ATen/cuda/CUDAContext.h>
#include <torch/extension.h>
#include <torch/torch.h>
#if TORCH_VERSION_MINOR >= 13
#include <torch/csrc/distributed/c10d/Types.hpp>
#else
#include <c10d/Types.hpp>
#endif
#include <iostream>
#include "context.h"
...
...
colossalai/kernel/cuda_native/csrc/multihead_attention_1d.h
View file @
e0da01ea
...
...
@@ -4,8 +4,14 @@
#include <cuda.h>
#include <cuda_fp16.h>
#include <cuda_runtime_api.h>
#include <torch/torch.h>
#if TORCH_VERSION_MINOR >= 13
#include <torch/csrc/distributed/c10d/ProcessGroup.hpp>
#else
#include <c10d/ProcessGroup.hpp>
#endif
#include <string>
#include <type_traits>
...
...
@@ -157,4 +163,4 @@ class MultiHeadAttention {
c10
::
intrusive_ptr
<
c10d
::
ProcessGroup
>
pg
;
int
pg_size
;
};
\ No newline at end of file
};
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