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
gaoqiong
composable_kernel
Commits
54b3e73d
Commit
54b3e73d
authored
Aug 06, 2021
by
Chao Liu
Browse files
rename
parent
f6edda61
Changes
51
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
44 additions
and
44 deletions
+44
-44
host/online_compile/hip_utility/kernel_build_params.cpp
host/online_compile/hip_utility/kernel_build_params.cpp
+2
-2
host/online_compile/hip_utility/kernel_cache.cpp
host/online_compile/hip_utility/kernel_cache.cpp
+2
-2
host/online_compile/hip_utility/logger.cpp
host/online_compile/hip_utility/logger.cpp
+3
-3
host/online_compile/hip_utility/md5.cpp
host/online_compile/hip_utility/md5.cpp
+2
-2
host/online_compile/hip_utility/target_properties.cpp
host/online_compile/hip_utility/target_properties.cpp
+3
-3
host/online_compile/hip_utility/tmp_dir.cpp
host/online_compile/hip_utility/tmp_dir.cpp
+4
-4
host/online_compile/include/binary_cache.hpp
host/online_compile/include/binary_cache.hpp
+2
-2
host/online_compile/include/config.h.in
host/online_compile/include/config.h.in
+0
-0
host/online_compile/include/env.hpp
host/online_compile/include/env.hpp
+5
-5
host/online_compile/include/exec_utils.hpp
host/online_compile/include/exec_utils.hpp
+2
-2
host/online_compile/include/handle.hpp
host/online_compile/include/handle.hpp
+2
-2
host/online_compile/include/hipCheck.hpp
host/online_compile/include/hipCheck.hpp
+0
-0
host/online_compile/include/hip_build_utils.hpp
host/online_compile/include/hip_build_utils.hpp
+3
-3
host/online_compile/include/hipoc_kernel.hpp
host/online_compile/include/hipoc_kernel.hpp
+2
-2
host/online_compile/include/hipoc_program.hpp
host/online_compile/include/hipoc_program.hpp
+2
-2
host/online_compile/include/hipoc_program_impl.hpp
host/online_compile/include/hipoc_program_impl.hpp
+2
-2
host/online_compile/include/kernel.hpp
host/online_compile/include/kernel.hpp
+2
-2
host/online_compile/include/kernel_build_params.hpp
host/online_compile/include/kernel_build_params.hpp
+2
-2
host/online_compile/include/kernel_cache.hpp
host/online_compile/include/kernel_cache.hpp
+2
-2
host/online_compile/include/logger.hpp
host/online_compile/include/logger.hpp
+2
-2
No files found.
host/online_compil
ation
/hip_utility/kernel_build_params.cpp
→
host/online_compil
e
/hip_utility/kernel_build_params.cpp
View file @
54b3e73d
...
...
@@ -31,7 +31,7 @@
#include <kernel_build_params.hpp>
#include <stringutils.hpp>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
static
std
::
string
GenerateDefines
(
const
std
::
vector
<
KernelBuildParameter
>&
options
,
const
std
::
string
&
prefix
)
...
...
@@ -63,4 +63,4 @@ static std::string GenerateDefines(const std::vector<KernelBuildParameter>& opti
return
JoinStrings
(
strs
,
" "
);
}
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
host/online_compil
ation
/hip_utility/kernel_cache.cpp
→
host/online_compil
e
/hip_utility/kernel_cache.cpp
View file @
54b3e73d
...
...
@@ -46,7 +46,7 @@
#include <iostream>
#include <iterator>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
const
std
::
vector
<
Kernel
>&
KernelCache
::
GetKernels
(
const
std
::
string
&
algorithm
,
const
std
::
string
&
network_config
)
...
...
@@ -151,4 +151,4 @@ void KernelCache::ClearKernels(const std::string& algorithm, const std::string&
KernelCache
::
KernelCache
()
{}
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
host/online_compil
ation
/hip_utility/logger.cpp
→
host/online_compil
e
/hip_utility/logger.cpp
View file @
54b3e73d
...
...
@@ -5,7 +5,7 @@
using
namespace
std
;
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
#if OLC_DEBUG
static
LogLevel
defLevel
=
LogLevel
::
Info2
;
...
...
@@ -27,7 +27,7 @@ string LogLevelString(LogLevel level)
ostream
&
fdt_log
(
LogLevel
level
,
const
char
*
header
,
const
char
*
content
)
{
if
(
level
>
o
lC
ompile
::
defLevel
)
if
(
level
>
o
nline_c
ompile
::
defLevel
)
{
return
(
cerr
);
};
...
...
@@ -40,4 +40,4 @@ ostream& fdt_log(LogLevel level, const char* header, const char* content)
ostream
&
fdt_log
()
{
return
(
cerr
);
};
void
fdt_log_flush
()
{
cerr
<<
endl
;
}
};
// namespace o
lC
ompile
};
// namespace o
nline_c
ompile
host/online_compil
ation
/hip_utility/md5.cpp
→
host/online_compil
e
/hip_utility/md5.cpp
View file @
54b3e73d
...
...
@@ -298,7 +298,7 @@ static void MD5_Final(unsigned char* result, MD5_CTX* ctx)
memset
(
ctx
,
0
,
sizeof
(
*
ctx
));
}
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
std
::
string
md5
(
std
::
string
s
)
{
...
...
@@ -316,4 +316,4 @@ std::string md5(std::string s)
return
sout
.
str
();
}
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
host/online_compil
ation
/hip_utility/target_properties.cpp
→
host/online_compil
e
/hip_utility/target_properties.cpp
View file @
54b3e73d
...
...
@@ -32,7 +32,7 @@
OLC_DECLARE_ENV_VAR
(
OLC_DEBUG_ENFORCE_DEVICE
)
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
static
std
::
string
GetDeviceNameFromMap
(
const
std
::
string
&
in
)
{
...
...
@@ -53,7 +53,7 @@ static std::string GetDeviceNameFromMap(const std::string& in)
{
"10.3.0 Sienna_Cichlid 18"
,
"gfx1030"
},
};
const
char
*
const
p_asciz
=
o
lC
ompile
::
GetStringEnv
(
OLC_DEBUG_ENFORCE_DEVICE
{});
const
char
*
const
p_asciz
=
o
nline_c
ompile
::
GetStringEnv
(
OLC_DEBUG_ENFORCE_DEVICE
{});
if
(
p_asciz
!=
nullptr
&&
strlen
(
p_asciz
)
>
0
)
return
{
p_asciz
};
...
...
@@ -116,4 +116,4 @@ void TargetProperties::InitDbId()
dbId
+=
"_xnack"
;
}
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
host/online_compil
ation
/hip_utility/tmp_dir.cpp
→
host/online_compil
e
/hip_utility/tmp_dir.cpp
View file @
54b3e73d
...
...
@@ -31,7 +31,7 @@
OLC_DECLARE_ENV_VAR
(
OLC_DEBUG_SAVE_TEMP_DIR
)
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
void
SystemCmd
(
std
::
string
cmd
)
{
...
...
@@ -43,7 +43,7 @@ void SystemCmd(std::string cmd)
TmpDir
::
TmpDir
(
std
::
string
prefix
)
:
path
(
boost
::
filesystem
::
temp_directory_path
()
/
boost
::
filesystem
::
unique_path
(
"o
lC
ompile-"
+
prefix
+
"-%%%%-%%%%-%%%%-%%%%"
))
boost
::
filesystem
::
unique_path
(
"o
nline_c
ompile-"
+
prefix
+
"-%%%%-%%%%-%%%%-%%%%"
))
{
boost
::
filesystem
::
create_directories
(
this
->
path
);
}
...
...
@@ -57,10 +57,10 @@ void TmpDir::Execute(std::string exe, std::string args) const
TmpDir
::~
TmpDir
()
{
if
(
!
o
lC
ompile
::
IsEnabled
(
OLC_DEBUG_SAVE_TEMP_DIR
{}))
if
(
!
o
nline_c
ompile
::
IsEnabled
(
OLC_DEBUG_SAVE_TEMP_DIR
{}))
{
boost
::
filesystem
::
remove_all
(
this
->
path
);
}
}
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
host/online_compil
ation
/include/binary_cache.hpp
→
host/online_compil
e
/include/binary_cache.hpp
View file @
54b3e73d
...
...
@@ -31,7 +31,7 @@
#include <boost/filesystem/path.hpp>
#include <string>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
boost
::
filesystem
::
path
GetCacheFile
(
const
std
::
string
&
device
,
const
std
::
string
&
name
,
const
std
::
string
&
args
);
...
...
@@ -47,6 +47,6 @@ void SaveBinary(const boost::filesystem::path& binary_path,
const
std
::
string
&
name
,
const
std
::
string
&
args
);
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif
host/online_compil
ation
/include/config.h.in
→
host/online_compil
e
/include/config.h.in
View file @
54b3e73d
File moved
host/online_compil
ation
/include/env.hpp
→
host/online_compil
e
/include/env.hpp
View file @
54b3e73d
...
...
@@ -31,7 +31,7 @@
#include <string>
#include <vector>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
/// \todo Rework: Case-insensitive string compare, ODR, (?) move to .cpp
...
...
@@ -101,23 +101,23 @@ inline const char* GetStringEnv(T)
template
<
class
T
>
inline
bool
IsEnabled
(
T
)
{
static
const
bool
result
=
o
lC
ompile
::
IsEnvvarValueEnabled
(
T
::
value
());
static
const
bool
result
=
o
nline_c
ompile
::
IsEnvvarValueEnabled
(
T
::
value
());
return
result
;
}
template
<
class
T
>
inline
bool
IsDisabled
(
T
)
{
static
const
bool
result
=
o
lC
ompile
::
IsEnvvarValueDisabled
(
T
::
value
());
static
const
bool
result
=
o
nline_c
ompile
::
IsEnvvarValueDisabled
(
T
::
value
());
return
result
;
}
template
<
class
T
>
inline
unsigned
long
int
Value
(
T
,
unsigned
long
int
fallback
=
0
)
{
static
const
auto
result
=
o
lC
ompile
::
EnvvarValue
(
T
::
value
(),
fallback
);
static
const
auto
result
=
o
nline_c
ompile
::
EnvvarValue
(
T
::
value
(),
fallback
);
return
result
;
}
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif
host/online_compil
ation
/include/exec_utils.hpp
→
host/online_compil
e
/include/exec_utils.hpp
View file @
54b3e73d
...
...
@@ -30,13 +30,13 @@
#include <ostream>
#include <string>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
namespace
exec
{
/// Redirecting both input and output is not supported.
int
Run
(
const
std
::
string
&
p
,
std
::
istream
*
in
,
std
::
ostream
*
out
);
}
// namespace exec
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif // EXEC_UTILS_HPP
host/online_compil
ation
/include/handle.hpp
→
host/online_compil
e
/include/handle.hpp
View file @
54b3e73d
...
...
@@ -40,7 +40,7 @@
#include <vector>
#include <unordered_map>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
struct
HandleImpl
;
...
...
@@ -140,6 +140,6 @@ struct Handle
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Handle
&
handle
)
{
return
handle
.
Print
(
os
);
}
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif // GUARD_OLC_HANDLE_HPP_
host/online_compil
ation
/include/hipCheck.hpp
→
host/online_compil
e
/include/hipCheck.hpp
View file @
54b3e73d
File moved
host/online_compil
ation
/include/hip_build_utils.hpp
→
host/online_compil
e
/include/hip_build_utils.hpp
View file @
54b3e73d
...
...
@@ -31,9 +31,9 @@
#include <boost/optional.hpp>
#include <string>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
boost
::
filesystem
::
path
HipBuild
(
boost
::
optional
<
o
lC
ompile
::
TmpDir
>&
tmp_dir
,
boost
::
filesystem
::
path
HipBuild
(
boost
::
optional
<
o
nline_c
ompile
::
TmpDir
>&
tmp_dir
,
const
std
::
string
&
filename
,
std
::
string
src
,
std
::
string
params
,
...
...
@@ -92,6 +92,6 @@ class LcOptionTargetStrings
}
};
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif
host/online_compil
ation
/include/hipoc_kernel.hpp
→
host/online_compil
e
/include/hipoc_kernel.hpp
View file @
54b3e73d
...
...
@@ -36,7 +36,7 @@
#include <vector>
#include <memory>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
using
HipEventPtr
=
OLC_MANAGE_PTR
(
hipEvent_t
,
hipEventDestroy
);
inline
HipEventPtr
make_hip_event
()
...
...
@@ -169,6 +169,6 @@ struct HIPOCKernel
std
::
function
<
void
(
hipEvent_t
,
hipEvent_t
)
>
callback
=
nullptr
)
const
;
};
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif
host/online_compil
ation
/include/hipoc_program.hpp
→
host/online_compil
e
/include/hipoc_program.hpp
View file @
54b3e73d
...
...
@@ -33,7 +33,7 @@
#include <hip/hip_runtime_api.h>
#include <string>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
struct
HIPOCProgramImpl
;
struct
HIPOCProgram
...
...
@@ -59,6 +59,6 @@ struct HIPOCProgram
/// False if CO resides on filesystem.
bool
IsCodeObjectInMemory
()
const
;
};
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif
host/online_compil
ation
/include/hipoc_program_impl.hpp
→
host/online_compil
e
/include/hipoc_program_impl.hpp
View file @
54b3e73d
...
...
@@ -33,7 +33,7 @@
#include <boost/optional.hpp>
#include <hip/hip_runtime_api.h>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
using
hipModulePtr
=
OLC_MANAGE_PTR
(
hipModule_t
,
hipModuleUnload
);
...
...
@@ -57,5 +57,5 @@ struct HIPOCProgramImpl
BuildCodeObjectInFile
(
std
::
string
&
params
,
const
std
::
string
&
src
,
const
std
::
string
&
filename
);
void
BuildCodeObject
(
std
::
string
params
);
};
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif // GUARD_OLC_HIPOC_PROGRAM_IMPL_HPP
host/online_compil
ation
/include/kernel.hpp
→
host/online_compil
e
/include/kernel.hpp
View file @
54b3e73d
...
...
@@ -30,7 +30,7 @@
#include <vector>
#include <hipoc_kernel.hpp>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
std
::
string
GetKernelSrc
(
std
::
string
name
);
std
::
string
GetKernelInc
(
std
::
string
key
);
std
::
vector
<
std
::
string
>
GetKernelIncList
();
...
...
@@ -40,6 +40,6 @@ using Kernel = HIPOCKernel;
using
KernelInvoke
=
HIPOCKernelInvoke
;
using
Program
=
HIPOCProgram
;
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif
host/online_compil
ation
/include/kernel_build_params.hpp
→
host/online_compil
e
/include/kernel_build_params.hpp
View file @
54b3e73d
...
...
@@ -32,7 +32,7 @@
#include <string>
#include <vector>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
namespace
kbp
{
struct
Option
...
...
@@ -132,6 +132,6 @@ class KernelBuildParameters
}
};
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif
host/online_compil
ation
/include/kernel_cache.hpp
→
host/online_compil
e
/include/kernel_cache.hpp
View file @
54b3e73d
...
...
@@ -49,7 +49,7 @@
#include <unordered_map>
#include <vector>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
/**
* @brief The KernelCache class Build and cache kernels
...
...
@@ -92,6 +92,6 @@ class KernelCache
ProgramMap
program_map
;
};
}
// namespace o
lC
ompile
}
// namespace o
nline_c
ompile
#endif // GUARD_OLC_KERNEL_CACHE_HPP_
host/online_compil
ation
/include/logger.hpp
→
host/online_compil
e
/include/logger.hpp
View file @
54b3e73d
...
...
@@ -3,7 +3,7 @@
#include <fstream>
namespace
o
lC
ompile
{
namespace
o
nline_c
ompile
{
enum
class
LogLevel
{
...
...
@@ -18,6 +18,6 @@ std::ostream& fdt_log(LogLevel level, const char* header, const char* content);
std
::
ostream
&
fdt_log
();
void
fdt_log_flush
();
};
// namespace o
lC
ompile
};
// namespace o
nline_c
ompile
#endif
Prev
1
2
3
Next
gaoqiong
@gaoqiong
mentioned in commit
6fe3627a
·
Dec 05, 2023
mentioned in commit
6fe3627a
mentioned in commit 6fe3627a9eb35f1237266f1b6cc8fd3456aed67d
Toggle commit list
gaoqiong
@gaoqiong
mentioned in commit
dfb80c4e
·
Dec 05, 2023
mentioned in commit
dfb80c4e
mentioned in commit dfb80c4e39ec7b304c3ebc88bab2a204bc4906b9
Toggle commit list
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