-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Perf] [metal] Support TLS and SIMD group reduction for range-for ker…
…nels (#1358) * [Perf] [metal] Support TLS and SIMD group reduction * newline * [skip ci] enforce code format Co-authored-by: Taichi Gardener <[email protected]>
- Loading branch information
1 parent
ee0281f
commit 6100ee2
Showing
10 changed files
with
193 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "taichi/backends/metal/env_config.h" | ||
|
||
#include "taichi/lang_util.h" | ||
#include "taichi/util/environ_config.h" | ||
|
||
TLANG_NAMESPACE_BEGIN | ||
namespace metal { | ||
|
||
EnvConfig::EnvConfig() { | ||
simdgroup_enabled_ = | ||
get_environ_config("TI_USE_METAL_SIMDGROUP", /*default_value=*/1); | ||
} | ||
|
||
const EnvConfig &EnvConfig::instance() { | ||
static const EnvConfig c; | ||
return c; | ||
} | ||
|
||
} // namespace metal | ||
|
||
TLANG_NAMESPACE_END |
Oops, something went wrong.