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
deepspeed
Commits
1b2721ad
Commit
1b2721ad
authored
Aug 10, 2022
by
aiss
Browse files
modify version code
parent
c3e434ae
Pipeline
#197
failed with stages
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
2 deletions
+32
-2
csrc/adam/custom_hip_kernel.hip
csrc/adam/custom_hip_kernel.hip
+22
-0
op_builder/builder.py
op_builder/builder.py
+4
-1
setup.py
setup.py
+6
-1
No files found.
csrc/adam/custom_hip_kernel.hip
0 → 100644
View file @
1b2721ad
// !!! This is a file automatically generated by hipify!!!
#include "hip/hip_runtime.h"
#include "custom_hip_layers.h"
__global__ void param_update_kernel(const float* input, __half* output, int size)
{
int id = blockIdx.x * blockDim.x + threadIdx.x;
if (id < size) { output[id] = (__half)input[id]; }
}
void launch_param_update(const float* input, __half* output, int size, hipStream_t stream)
{
int threads = 1024;
dim3 grid_dim((size - 1) / threads + 1);
dim3 block_dim(threads);
hipLaunchKernelGGL(( param_update_kernel), dim3(grid_dim), dim3(block_dim), 0, stream, input, output, size);
}
op_builder/builder.py
View file @
1b2721ad
...
@@ -190,7 +190,10 @@ class OpBuilder(ABC):
...
@@ -190,7 +190,10 @@ class OpBuilder(ABC):
if
OpBuilder
.
is_rocm_pytorch
():
if
OpBuilder
.
is_rocm_pytorch
():
from
torch.utils.cpp_extension
import
ROCM_HOME
from
torch.utils.cpp_extension
import
ROCM_HOME
#with open('/opt/rocm/.info/version-dev', 'r') as file:
#with open('/opt/rocm/.info/version-dev', 'r') as file:
with
open
(
'/opt/dtk-22.04/.info/version-dev'
,
'r'
)
as
file
:
#aiss 20220810
ds_build_version
=
os
.
getenv
(
'ROCM_PATH'
,
""
)
with
open
(
'{0}/.info/version-dev'
.
format
(
ds_build_version
),
'r'
)
as
file
:
ROCM_VERSION_DEV_RAW
=
file
.
read
()
ROCM_VERSION_DEV_RAW
=
file
.
read
()
ROCM_MAJOR
=
ROCM_VERSION_DEV_RAW
.
split
(
'.'
)[
0
]
ROCM_MAJOR
=
ROCM_VERSION_DEV_RAW
.
split
(
'.'
)[
0
]
ROCM_MINOR
=
ROCM_VERSION_DEV_RAW
.
split
(
'.'
)[
1
]
ROCM_MINOR
=
ROCM_VERSION_DEV_RAW
.
split
(
'.'
)[
1
]
...
...
setup.py
View file @
1b2721ad
...
@@ -178,7 +178,12 @@ if command_exists('git') and 'DS_BUILD_STRING' not in os.environ:
...
@@ -178,7 +178,12 @@ if command_exists('git') and 'DS_BUILD_STRING' not in os.environ:
git_hash
=
result
.
decode
(
'utf-8'
).
strip
()
git_hash
=
result
.
decode
(
'utf-8'
).
strip
()
result
=
subprocess
.
check_output
(
git_branch_cmd
,
shell
=
True
)
result
=
subprocess
.
check_output
(
git_branch_cmd
,
shell
=
True
)
git_branch
=
result
.
decode
(
'utf-8'
).
strip
()
git_branch
=
result
.
decode
(
'utf-8'
).
strip
()
git_hash
+=
"dtk22.04"
##aiss 20220810
if
os
.
getenv
(
'DS_BUILD_VERSION'
):
version_dtk
=
os
.
getenv
(
'DS_BUILD_VERSION'
,
""
)
git_hash
+=
"."
+
version_dtk
#git_hash +="dtk22.04"
except
subprocess
.
CalledProcessError
:
except
subprocess
.
CalledProcessError
:
git_hash
=
"unknown"
git_hash
=
"unknown"
git_branch
=
"unknown"
git_branch
=
"unknown"
...
...
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