Skip to content

Commit

Permalink
fix hip build
Browse files Browse the repository at this point in the history
  • Loading branch information
goliaro committed Sep 3, 2024
1 parent 828f72e commit a8294e8
Show file tree
Hide file tree
Showing 37 changed files with 524 additions and 162 deletions.
2 changes: 1 addition & 1 deletion config/config.inc
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ fi

# set ROCM path
if [ -n "$ROCM_PATH" ]; then
SET_ROCM_PATH="-DROCM_PATH=${ROCM_PATH}"
SET_ROCM_PATH="-DROCM_PATH=${ROCM_PATH} -DHIP_ROOT_DIR=${ROCM_PATH}"
fi

ADD_ROCM_TO_PATH=""
Expand Down
2 changes: 1 addition & 1 deletion src/ops/add_bias_residual_layer_norm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ AddBiasResidualLayerNormParams AddBiasResidualLayerNorm::get_params() const {
params.eps = this->eps;
params.use_bias = this->use_bias;
params.inplace_residual = this->inplace_residual;
if (this->name != nullptr) {
if (strlen(this->name) < MAX_OPNAME) {
strcpy(params.name, this->name);
}
return params;
Expand Down
2 changes: 1 addition & 1 deletion src/ops/aggregate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ AggregateParams Aggregate::get_params() const {
AggregateParams params;
params.n = this->n;
params.lambda_bal = this->lambda_bal;
if (this->name != nullptr) {
if (strlen(this->name) < MAX_OPNAME) {
strcpy(params.name, this->name);
}
return params;
Expand Down
2 changes: 1 addition & 1 deletion src/ops/aggregate_spec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ AggregateSpecParams AggregateSpec::get_params() const {
AggregateSpecParams params;
params.n = this->n;
params.lambda_bal = this->lambda_bal;
if (this->name != nullptr) {
if (strlen(this->name) < MAX_OPNAME) {
strcpy(params.name, this->name);
}
return params;
Expand Down
2 changes: 1 addition & 1 deletion src/ops/arg_topk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ ArgTopKParams ArgTopK::get_params() const {
params.k = this->k;
params.sorted = this->sorted;
params.speculative_decoding = this->speculative_decoding;
if (this->name != nullptr) {
if (strlen(this->name) < MAX_OPNAME) {
strcpy(params.name, this->name);
}
return params;
Expand Down
2 changes: 1 addition & 1 deletion src/ops/argmax.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Op *ArgMax::create_operator_from_layer(
ArgMaxParams ArgMax::get_params() const {
ArgMaxParams params;
params.beam_search = this->beam_search;
if (this->name != nullptr) {
if (strlen(this->name) < MAX_OPNAME) {
strcpy(params.name, this->name);
}
return params;
Expand Down
Loading

0 comments on commit a8294e8

Please sign in to comment.