Skip to content

Commit

Permalink
feat: update v5.1 (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
byshiue authored Aug 16, 2022
1 parent e1b931f commit bc21406
Show file tree
Hide file tree
Showing 604 changed files with 57,827 additions and 29,517 deletions.
256 changes: 0 additions & 256 deletions .gitlab-ci.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .gitlab/issue_templates/bug.md

This file was deleted.

6 changes: 0 additions & 6 deletions .gitlab/issue_templates/feature.md

This file was deleted.

7 changes: 0 additions & 7 deletions .gitlab/merge_request_templates/merge.md

This file was deleted.

4 changes: 3 additions & 1 deletion 3rdparty/INIReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class INIReader
// Construct INIReader and parse given file. See ini.h for more info
// about the parsing.
INIReader(FILE *file);

~INIReader();
// Return the result of ini_parse(), i.e., 0 on success, line number of
// first error on parse error, or -1 on file open error.
int ParseError() const;
Expand Down Expand Up @@ -384,6 +384,8 @@ inline int INIReader::ParseError() const
return _error;
}

inline INIReader::~INIReader() { }

inline const std::set<std::string>& INIReader::Sections() const
{
return _sections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,15 @@ class TFusedMHAKernelFactory

static TFusedMHAKernelFactory<TFusedMHAKernelList>& Get()
{
static TFusedMHAKernelFactory<TFusedMHAKernelList> s_factory;
return s_factory;
int device_id;
cudaGetDevice(&device_id);
static std::unique_ptr<TFusedMHAKernelFactory<TFusedMHAKernelList>> s_factory[32] = {nullptr};
if (s_factory[device_id] == nullptr) {
assert(device_id <= 32);
s_factory[device_id] = std::make_unique<TFusedMHAKernelFactory<TFusedMHAKernelList>>(TFusedMHAKernelFactory<TFusedMHAKernelList>());
}

return *(s_factory[device_id]);
}

private:
Expand Down
Loading

0 comments on commit bc21406

Please sign in to comment.